-
-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x-IntervalUseToken #19
Comments
I don't completely get your point. Is the header something the API returns and we could use it to make the |
I believe, you can use return value of x-IntervalUseToken to speed up your API. Store returned value of x-IntervalUseToken (find timestamp of next allowed access) and store it; add a function to return value to user application that can query if it can send another query. And use it to wait in the case that user application tries to get data too early. Your python code assumes, that it has to wait 30 seconds between querires (it is information from official documenatation). But server signals how long you have to wait. Try to use that information... Example of query and reply, note header x-IntervalUseToken in the server reply:
I was too fast, error 409 was returned and there was no header x-IntervalUseToken in the reply :-(. It means, value x-IntervalUseToken has to be saved when it is returned with valid reply - 200 OK).
|
There is an extra header "x-IntervalUseToken" returned by server, it indicates required delay before next query with the same token. Some calls, like setting pointer doesn't require delay.
Example :
x-IntervalUseToken: 20000
x-IntervalUseToken: 0
Unfortunately, when reply "409 Conflict" is returned, header x-IntervalUseToken is not in the server reply :-(
The text was updated successfully, but these errors were encountered: