Esempio n. 1
0
        /// <summary>
        /// Returns anime query results with list information included.
        /// </summary>
        /// <param name="keywords">The search terms to use</param>
        /// <returns>A list of all anime results.</returns>
        /// <exception cref="ApiRequestException">if the request times out.</exception>
        /// <remarks>Some APIs have return count limits set</remarks>
        public async Task <List <Anime> > Find(string keywords)
        {
            var result = await _client.FindAnime(keywords);

            // update references if we already have the data in our list
            for (var i = 0; i < result.Count; i++)
            {
                if (Contains(result[i]))
                {
                    result[i] = this[result[i].Id];
                }
            }
            return(result);
        }