コード例 #1
0
        // This is the method we use to get our list of streaming providers using the IMDB ID
        // Note: country code must be lowercase!
        public static UtellyResultById SearchUtellyById(string searchTerms)
        {
            var client  = new RestClient($"https://utelly-tv-shows-and-movies-availability-v1.p.rapidapi.com/idlookup?country=us&source_id={searchTerms}&source=imdb");
            var request = new RestRequest(Method.GET);

            request.AddHeader("x-rapidapi-host", "utelly-tv-shows-and-movies-availability-v1.p.rapidapi.com");
            request.AddHeader("x-rapidapi-key", _utellyKey);
            IRestResponse response = client.Execute(request);

            UtellyResultById utellyResultConv = UtellyResultById.FromJson(response.Content);

            return(utellyResultConv);
        }
コード例 #2
0
ファイル: UtellyResult.cs プロジェクト: mkrell23/NowPlaying
 public static string ToJson(this UtellyResultById self) => JsonConvert.SerializeObject(self, NowPlaying.Converter.Settings);