2017-09-05, 07:51
(2017-09-05, 00:32)axlt2002 Wrote: About the single API key...how it will be managed if used by differnet users? Let's say 100 users with a library of 100 Episodes (I guess it will be quite more...)...this is already bringing to 10000 requests to the site...do you know if there is a limit to the number if queries?
There is limit of requests per time (40 req for few sec? or 40 req per 1 sec for one key?), if over, then response gives status code 25.
I used sleep in my perl code:
PHP Code:
my $repeat = 1;
while ($repeat) {
print " -> asking TMDB for tvshow $ref->{'value'}\n";
my $url = "https://api.themoviedb.org/3/find/".$ref->{'value'}.
"?api_key=".$api_key."&language=en-US&external_source=tvdb_id";
$response = $http->get($url);
print LOG "$url\n$response->{content}\n" if ($do_log);
if ($response->{content} =~ /"status_code":25,/) { print " -> sleep\n"; sleep 1; }
else { $repeat = 0; }
}