/// <summary> /// The find method makes it easy to search for objects in the database by an external id. For example, an IMDB ID. /// This method will search all objects(movies, TV shows and people) and return the results in a single response. /// </summary> /// <param name="id"></param> /// <param name="language">Default is english</param> /// <param name="external_id"></param> /// <returns></returns> public async Task <ObjectCollection> FindAsync(string id, string external_id, string language = "en") { var content = await REngine.CallApiAsync($"{REngine.Url}find/{id}?api_key={REngine.ApiKey}&language={language}&external_source={external_id}").ConfigureAwait(false); return(REngine.DeserializeJson <ObjectCollection>(content)); }
/// <summary> /// Get the details of a list. /// </summary> /// <param name="id">List Id</param> /// <param name="language">Defaults is set to english</param> /// <returns></returns> public async Task <ListDetails> GetListDetailsAsync(string id, string language = "en") { var content = await REngine.CallApiAsync($"{REngine.Url}list/{id}?api_key={REngine.ApiKey}&language={language}").ConfigureAwait(false); return(REngine.DeserializeJson <ListDetails>(content)); }
/// <summary> /// In order to use the client you must provide the api key /// </summary> /// <param name="_apiKey">Tmdb Api key</param> /// <param name="_secure">Prefer ssl or not. Default set to true</param> public EasyClient(string _apiKey, bool _secure = true) { REngine.Initialize(_apiKey, _secure); }