当前位置: 首页>>代码示例>>C#>>正文


C# Request.ProcessSearchRequestAsync方法代码示例

本文整理汇总了C#中Request.ProcessSearchRequestAsync方法的典型用法代码示例。如果您正苦于以下问题:C# Request.ProcessSearchRequestAsync方法的具体用法?C# Request.ProcessSearchRequestAsync怎么用?C# Request.ProcessSearchRequestAsync使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Request的用法示例。


在下文中一共展示了Request.ProcessSearchRequestAsync方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SearchCompanyAsync

 /// <summary>
 /// Searches for companies that match the query string.
 /// </summary>
 /// <param name="query">The query string.</param>
 /// <param name="page">The request page of the search results, giving 0 will give all results.</param>
 /// <returns>The resultset with the found company summaries.</returns>
 public static async Task<SearchResult<CompanySummary>> SearchCompanyAsync(string query, int page = 1)
 {
     var request = new Request<CompanySummary>("search/company");
     request.AddParameter("query", query.EscapeString());
     request.AddParameter("page", page);
     return await request.ProcessSearchRequestAsync();
 }
开发者ID:Fishes,项目名称:TMDbWrapper,代码行数:13,代码来源:TheMovieDbSearch.cs

示例2: GetCompanyCreditsAsync

 /// <summary>
 /// Gets the credits of the specified company.
 /// </summary>
 /// <param name="CompanyId">The id of the company</param>
 /// <param name="page">The request page of the search results, giving 0 will give all results.</param>
 /// <returns>A page of credits</returns>
 public static async Task<SearchResult<MovieSummary>> GetCompanyCreditsAsync(int CompanyId, int page = 1)
 {
     Request<MovieSummary> request = new Request<MovieSummary>("company/" + CompanyId.ToString() + "/movies");
     request.AddParameter("page", page);
     if(!string.IsNullOrEmpty(Language))
         request.AddParameter("language", Language);
     return await request.ProcessSearchRequestAsync();
 }
开发者ID:Rawrpwnzl,项目名称:TMDbWrapper,代码行数:14,代码来源:TheMovieDbCompany.cs

示例3: SearchCollectionAsync

 /// <summary>
 /// Searches for collections that match the query string.
 /// </summary>
 /// <param name="query">The query string</param>
 /// <param name="page">The request page of the search results, giving 0 will give all results.</param>
 /// <returns>The resultset with found collections.</returns>
 public static async Task<SearchResult<CollectionSummary>> SearchCollectionAsync(string query, int page = 1)
 {
     var request = new Request<CollectionSummary>("search/collection");
     request.AddParameter("query", query.EscapeString());
     request.AddParameter("page", page);
     if (!string.IsNullOrEmpty(Language))
         request.AddParameter("language", Language);
     return await request.ProcessSearchRequestAsync();
 }
开发者ID:Fishes,项目名称:TMDbWrapper,代码行数:15,代码来源:TheMovieDbSearch.cs

示例4: SearchMovieAsync

        /// <summary>
        /// Searches for movies that match the query string.
        /// </summary>
        /// <param name="query">The query string</param>
        /// <param name="page">The request page of the search results, giving 0 will give all results.</param>
        /// <param name="includeAdult">Indicates whether to include adult movies.</param>
        /// <param name="year">If specified the year the movies are released.</param>
        /// <returns>A search result set of movie summaries.</returns>
        public static async Task<SearchResult<MovieSummary>> SearchMovieAsync(string query, int page = 1, bool? includeAdult = null, int? year = null)
        {
            var request = new Request<MovieSummary>("search/movie");
            
            request.AddParameter("query", query.EscapeString());
            request.AddParameter("page", page);
            if (!string.IsNullOrEmpty(Language))
                request.AddParameter("language", Language);
            if (includeAdult.HasValue)
                request.AddParameter("include_adult", includeAdult.Value ? "true" : "false");
            if (year.HasValue)
                request.AddParameter("year", year.Value.ToString());

            return await request.ProcessSearchRequestAsync();
        }
开发者ID:Fishes,项目名称:TMDbWrapper,代码行数:23,代码来源:TheMovieDbSearch.cs

示例5: SearchTVAsync

 /// <summary>
 /// Searches for TV series that match the query string
 /// </summary>
 /// <param name="query">The query string</param>
 /// <param name="firstAirDateYear">The year of first air date</param>
 /// <param name="page">The request page of the search results, giving 0 will give all results.</param>
 /// <returns>The resultset with the found tv series.</returns>
 public static async Task<SearchResult<TVSummary>> SearchTVAsync(string query, int? firstAirDateYear = null, int page = 1)
 {
     var request = new Request<TVSummary>("search/tv");
     request.AddParameter("query", query.EscapeString());
     request.AddParameter("page", page);
     if (firstAirDateYear.HasValue)
     {
         request.AddParameter("first_air_date_year", firstAirDateYear.Value);
     }
     return await request.ProcessSearchRequestAsync();
 }
开发者ID:Fishes,项目名称:TMDbWrapper,代码行数:18,代码来源:TheMovieDbSearch.cs

示例6: GetSimilarMoviesAsync

        /// <summary>
        /// Gets movies that are similiar to the specified movie.
        /// </summary>
        /// <param name="movieId">The specific movie.</param>
        /// <param name="page">The request page of the search results, giving 0 will give all results.</param>
        /// <returns>A result set with movie summaries.</returns>
        public static async Task<SearchResult<MovieSummary>> GetSimilarMoviesAsync(int movieId, int page = 1)
        {
            var request = new Request<MovieSummary>("movie/" + movieId + "/similar_movies");
            request.AddParameter("page", page);
            if (!string.IsNullOrEmpty(Language))
                request.AddParameter("language", Language);

            return await request.ProcessSearchRequestAsync();
        }        
开发者ID:Fishes,项目名称:TMDbWrapper,代码行数:15,代码来源:TheMovieDbMovie.cs


注:本文中的Request.ProcessSearchRequestAsync方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。