identify-media
Version:
Analyse file path and content to make search criteria for media APIs
19 lines (16 loc) • 460 B
text/typescript
import {RequestConfig, TmdbFindQuery} from "../index";
const find = (param: TmdbFindQuery, apiKey: string): RequestConfig => {
const {language, id, idType} = param;
return {
method: 'GET',
params: {
api_key: apiKey,
language,
external_source: idType
},
baseURL: 'https://api.themoviedb.org',
url: `/3/find/${id}`,
responseType: 'json',
};
}
export default find;