XAMPPRocky / octocrab

A modern, extensible GitHub API Client for Rust.
Other
1.07k stars 261 forks source link

Should `RateLimit::reset` be a `u64`? #614

Closed smoelius closed 6 months ago

smoelius commented 6 months ago

Re this line: https://github.com/XAMPPRocky/octocrab/blob/131ddc02b2546f8c9863f98703fb92a3945ed8e8/src/models.rs#L959

The GitHub REST API docs describe the corresponding header (x-ratelimit-reset) as "UTC epoch seconds".

This suggests that users should pass the value to Duration::from_secs.

Since Duration::from_secs expects a u64, should this field be a u64?

XAMPPRocky commented 6 months ago

Thank you for your issue! Yeah I think that's a reasonable change.