We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This could be done in several ways.
The text was updated successfully, but these errors were encountered:
the token expires in 1 hour, so could use date.now() to
async getToken() { var token_response = get request var expiration_time = token_response .expires_in (1 hour) var start_time = Date.now()
var obj = { token: "", start_time: "", expiration_time: "" } return obj }
var Search() { if (start_time - current_time < 1 expiration_time) { get request } else { getToken() } }
Sorry, something went wrong.
No branches or pull requests
This could be done in several ways.
try
Search()
catch (error)
if error is because token has expired
The text was updated successfully, but these errors were encountered: