Skip to content
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

Can't distinguish whether time that has decimal seconds or not when decimal seconds is .000 #168

Open
Nanahuse opened this issue Jul 9, 2023 · 2 comments

Comments

@Nanahuse
Copy link

Nanahuse commented Jul 9, 2023

When I retrieve a time value from the API that includes decimal seconds but the value is ".000," the decimal portion gets omitted.
As a result, it becomes unclear whether it includes the decimal seconds.
"Time that has decimal places" is not equivalent to "Time that DONT has decimal places". However, they look same value.

Example:
Time is 40.000:

Currently API output:

"times":{
"primary":"40S"
......

Expected output:

"times":{
"primary":"40.000S"
......
@exodustx0
Copy link

A workaround could be adding the query parameter embed=game and checking game.data.ruleset["show-milliseconds"], though it's obviously not ideal due to the extra load. Could get that value through a separate GET request for the game and cache it, but the effectiveness depends on your use-case.

@Nanahuse
Copy link
Author

Nanahuse commented Jul 9, 2023

Thanks for the advice.
In games with a large number of runs, only fast times have a decimal seconds. it depend on time.
In my case, it is not solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants