using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Shared { public interface IQuoteService { // Retrieves the daily quote in a specified language. // 'lang' is a language code. Task GetDayliQuote(int lang); // Retrieves a specific quote by its unique identifier (id). Task GetQuoteById(int id); // Retrieves all available quotes in the system, without any filters. Task> GetAllQuote(); // Retrieves a page of some availble quote based on the index (pagination) // 'index' is the starting point for pagination // 'pageSize' determines the number of quotes per page Task> GetSomeQuote(int index, int pageSize); // Retrieves all available quotes but filtered by language. // 'lang' is a language code used to filter the quotes in the chosen language. Task> GetAllQuoteLang(int index, int pageSize, int lang); // Retrieves a page of quote suggestions based on the index (pagination) and language. // 'index' is the starting point for pagination // 'pageSize' determines the number of quotes per page // 'lang' specifies the language for the suggestions. Task> GetSuggestions(int index, int pageSize, int lang); // Retrieves the favorite quotes of a specific user. // 'index' is the starting point for pagination // 'pageSize' determines the number of quotes per page // 'UserId' is the identifier of the user to fetch their favorite quotes. Task> GetFavorites(int index, int pageSize, int UserId); // Retrieves a page of valid quotes with pagination. // 'index' is the current page // 'pageSize' is the number of quotes per page. Task> GetValidQuote(int index, int pageSize); // Retrieves a page of invalid quotes with pagination. // 'index' is the current page // 'pageSize' is the number of quotes per page. Task> GetInvalidQuote(int index, int pageSize); // Searches for quotes based on content (text of the quote), with pagination and filtering by language. // 'content' is the text of the quote // 'index' is the current page // 'pageSize' is the number of results per page // 'lang' is the language code to filter the results. Task> SearchByContent(string content, int index, int pageSize, int lang); // Searches for quotes by their source, with pagination and filtering by language. // 'source' is the source of the quote // 'index' is the current page // 'pageSize' is the number of results per page // 'lang' is the language code to filter the results. Task> SearchBySource(string source, int index, int pageSize, int lang); // Searches for quotes related to a specific character, with pagination and filtering by language. // 'character' refers to a name or role in the content // 'index' is the current page // 'pageSize' is the number of results per page, // 'lang' is the language code to filter the results. Task> SearchByCharacter(string character, int index, int pageSize, int lang); // Adds a new quote. // 'quote' is the quote object that will be added. Task AddQuote(TQuote quote); // Updates an existing quote identified by 'quoteId' with new details. // 'quoteId' is the ID of the quote to be updated // 'quote' contains the new data. Task UpdateQuote(int quoteId, TQuote quote); // Removes a quote based on its unique identifier ('quoteId'). Task RemoveQuote(int quoteId); // Returns the total number of quotes available. Task CountQuotes(); // Retrieves the last ID. Task GetLastQuoteId(); // Validates or invalidates a quote based on the 'quoteId' and a boolean value ('isValidate'). // If 'isValidate' is true, the quote is marked as valid; if false, it is invalid. Task ValidateQuote(int quoteId, bool isValidate); } }