[PR #375] [MERGED] More chrono::Duration usage in the API #423

Closed
opened 2026-02-27 20:24:40 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ramsayleung/rspotify/pull/375
Author: @marioortizmanero
Created: 12/27/2022
Status: Merged
Merged: 1/3/2023
Merged by: @ramsayleung

Base: masterHead: more-chrono-duration


📝 Commits (5)

📊 Changes

5 files changed (+42 additions, -28 deletions)

View changed files

📝 CHANGELOG.md (+4 -0)
📝 examples/ureq/seek_track.rs (+1 -1)
📝 rspotify-model/src/offset.rs (+3 -1)
📝 src/clients/oauth.rs (+27 -19)
📝 tests/test_with_oauth.rs (+7 -7)

📄 Description

Description

This uses more chrono::Duration in the API, as opposed to the more basic i32 and u32. It also renames some fields to position from position_ms

Motivation and Context

I noticed this in #366; using chrono::Duration is more versatile and idiomatic. Not sure if I missed any cases.

Dependencies

Nothing new.

Type of change

Please delete options that are not relevant.

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How has this been tested?

CI still passes

Is this change properly documented?

Yes


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ramsayleung/rspotify/pull/375 **Author:** [@marioortizmanero](https://github.com/marioortizmanero) **Created:** 12/27/2022 **Status:** ✅ Merged **Merged:** 1/3/2023 **Merged by:** [@ramsayleung](https://github.com/ramsayleung) **Base:** `master` ← **Head:** `more-chrono-duration` --- ### 📝 Commits (5) - [`c5d5950`](https://github.com/ramsayleung/rspotify/commit/c5d595097019046474a1661b86a8d37abc7670fd) Use more `chrono::Duration` - [`9bdd254`](https://github.com/ramsayleung/rspotify/commit/9bdd2540b16325ff960b9be9da89937aa65e7298) Fix tests - [`14f4bf9`](https://github.com/ramsayleung/rspotify/commit/14f4bf906055b227ab436f096d9f15e9a661e647) Update PR in changelog - [`97c85ad`](https://github.com/ramsayleung/rspotify/commit/97c85ad2c26842073fd68acc84ddae11e4273bfa) Fix example - [`a77a7bc`](https://github.com/ramsayleung/rspotify/commit/a77a7bcf7d3199f92271fca9a56064c4a2902f70) Move CHANGELOG entry to new version ### 📊 Changes **5 files changed** (+42 additions, -28 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+4 -0) 📝 `examples/ureq/seek_track.rs` (+1 -1) 📝 `rspotify-model/src/offset.rs` (+3 -1) 📝 `src/clients/oauth.rs` (+27 -19) 📝 `tests/test_with_oauth.rs` (+7 -7) </details> ### 📄 Description ## Description This uses more `chrono::Duration` in the API, as opposed to the more basic `i32` and `u32`. It also renames some fields to `position` from `position_ms` ## Motivation and Context I noticed this in #366; using `chrono::Duration` is more versatile and idiomatic. Not sure if I missed any cases. ## Dependencies Nothing new. ## Type of change Please delete options that are not relevant. - [x] Breaking change (fix or feature that would cause existing functionality to not work as expected) ## How has this been tested? CI still passes ## Is this change properly documented? Yes --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 20:24:40 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/rspotify#423
No description provided.