Results 1 to 5 of 5

Thread: Waiting time for requests

  1. #1

    Waiting time for requests

    I'm starting to work with the API and I have a question.
    The waiting time between requests is normal? Because it currently takes 1 second to return each request.
    I want to make a list of the members of my clan, indicating the level of their heroes.
    The clans / tag / members request returns very little information from the player, so I must iterate over each player's tag and look for the heroes level, and each request takes 1 second, therefore, it takes 50 seconds to deliver all the information. Is it normal or is there a better way to do it?
    Thank you

  2. #2
    Can anybody help me?

  3. #3

    Join Date
    Sep 2014
    Location
    Digging another tunnel in the data mine
    Posts
    6,442
    You should be able to request faster than that. I just timed a batch of requests, and was getting a bit over 5 per second
    For info on CWL see: CWL survival guide and data posts: 1 (stars), 2 (3* rates), 3 (rosters), 4 (start times and other)
    --------------------
    Forum cup organiser. The forum cup discord server is: https://discord.gg/KEUxV2e

  4. #4
    Just made a test, requesting clan info, then looped on 27 members, that is 28 requests for a total time of 18.6 secs. Around .66 secs/req, or 1.5 req/sec. But as it is in a cronjob, I really don't care : I fetch data every 58th min of every hour, the cronjobs could take 5 sec or 10 min, this would change nothing However I don't use war information yet, timing could be more important in that case, but war information is one request only, so even 0.6/0.7 sec average round trip is good enough.
    Last edited by bodiccea; January 27th, 2019 at 07:08 AM.

  5. #5
    Centennial Club
    Join Date
    Feb 2015
    Posts
    167
    You can do kore than one a second. You can also have up to ten keys.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •