Hello.
It`s possible? imdb + embed
http://api.tvmaze.com/lookup/shows?imdb=tt0944947&embed[]=episodes&embed[]=cast&embed[]=crew&embed[]=akas&embed[]=seasons
this request redirect to /shows/82 and all query params clear.
Hello.
It`s possible? imdb + embed
http://api.tvmaze.com/lookup/shows?imdb=tt0944947&embed[]=episodes&embed[]=cast&embed[]=crew&embed[]=akas&embed[]=seasons
this request redirect to /shows/82 and all query params clear.
It's intentional that it doesn't do this.
It's so that you reference the tvmaze ID in further requests rather than always using the lookup.
I have only IMDb ID, no more data.
I will have to use 2 requests, this affects performance and query limit by two.
const axios = require('axios');
(async function() {
try {
const redirect = await axios.get('http://api.tvmaze.com/lookup/shows?imdb=tt0944947', {maxRedirects: 0, validateStatus: null});
const data = await axios.get(redirect.headers.location + '?embed[]=seasons&embed[]=episodes&embed[]=cast&embed[]=crew&embed[]=akas');
console.log(data);
} catch (error) {
console.error(error);
}
})();
gazza911 wrote:
It's intentional that it doesn't do this.It's so that you reference the tvmaze ID in further requests rather than always using the lookup.
This will be counted as 2 requests?
binoni wrote:
This will be counted as 2 requests?
Yes, it would be 2 requests.
What you should be doing is using the lookup to retrieve the TVmaze ID and then storing that information (e.g. in a database) for future requests.
Thx, @gazza911.