Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what does remaining_requests mean in the response of api requested travis ci build?

Tags:

travis-ci

Subj.

Does it mean that in a free account I have limited number of api requests?

Example of the part of response:

{
  "@type": "pending",
  "remaining_requests": 9,
  "repository": {
    "@type": "repository",

When I sent my first response, the value was 10. After second response - it became 9...

like image 831
yashaka Avatar asked Oct 19 '22 08:10

yashaka


1 Answers

I think it's an hourly limit. The API code is here.

It says:

TIME_FRAME = 1.hour
LIMIT = 10

...

def remaining_requests(repository)
  api_builds_rate_limit = limit(repository)
  return api_builds_rate_limit if access_control.full_access?
  count = query(:requests).count(repository, TIME_FRAME)
  count > api_builds_rate_limit ? 0 : api_builds_rate_limit - count
end
like image 172
jjrv Avatar answered Jan 04 '23 06:01

jjrv