예제 #1
0
        public void WhenGettingAllRecentlyAddedEpisodes_ItShouldReturnAListOfEpisodes()
        {
            var service = new KodiService();

            var parameters = new GetRecentlyAddedEpisodesParams
            {
                Properties = new[] { EpisodeProperties.Title, EpisodeProperties.DateAdded }
            };

            var details = service.GetRecentlyAddedEpisodes(parameters);

            Assert.IsNotNull(details);
            Assert.IsNotNull(details.Result);
            Assert.Greater(details.Result.Episodes.Count, 0);
            Assert.IsInstanceOf <List <Episode> >(details.Result.Episodes);
        }
예제 #2
0
 public JsonRpcResponse <GetRecentlyAddedEpisodesResponse> GetRecentlyAddedEpisodes(GetRecentlyAddedEpisodesParams parameters = null,
                                                                                    string requestId = "GetRecentlyAddedEpisodesResponse")
 {
     return(_rpcConnector.MakeRequest <GetRecentlyAddedEpisodesResponse>(KodiMethods.GetRecentlyAddedEpisodes, parameters, requestId));
 }