コード例 #1
0
 public void TestReleaseTypes()
 {
     TestObject.SetReleaseTypes(new List <int> {
         10, 20
     });
     Assert.AreEqual("with_release_types=10,20", TestObject.RequestParameters.ToString());
 }
コード例 #2
0
        private async Task <DiscoverMovieAction> CreateDiscoveryAction(SearchCriteria criteria)
        {
            DiscoverMovieAction action = new DiscoverMovieAction()
                                         .SetGenres(_GenreProvider.GetGenreIds(criteria.Genres))
                                         .SetMaxDate(criteria.EndDate)
                                         .SetKeywords(await _KeywordProvider.GetKeywordIds(criteria.Keywords));

            if (criteria.UpcomingOnly)
            {
                action.SetReleaseTypes(new List <int> {
                    2, 3
                });
                action.SetMinDate(DateTime.Now);
            }
            return(action);
        }