[GH-ISSUE #78] Add support for async/await #24

Closed
opened 2026-02-27 20:22:39 +03:00 by kerem · 10 comments
Owner

Originally created by @ghost on GitHub (Feb 23, 2020).
Original GitHub issue: https://github.com/ramsayleung/rspotify/issues/78

I tried to add support for async/await in my branch. I added an example (examples/async-artist-top-tracks) for it and went well.

If you have no future or ongoing plans to add support for async/await, please try my branch and leave me feedback.

Originally created by @ghost on GitHub (Feb 23, 2020). Original GitHub issue: https://github.com/ramsayleung/rspotify/issues/78 I tried to add support for `async/await` in my [branch](https://github.com/echoSayonara/rspotify/tree/support-for-async-await). I added an example (`examples/async-artist-top-tracks`) for it and went well. If you have no future or ongoing plans to add support for `async/await`, please try my branch and leave me feedback.
kerem closed this issue 2026-02-27 20:22:39 +03:00
Author
Owner

@ramsayleung commented on GitHub (Feb 23, 2020):

As for ongoing plan to support async/await, I have talked with the author of spotify-tui on this PR, and everything is working in process now. Because my full time job is so damn busy, I have to take some extra time to support async/await, so please be patient :)

<!-- gh-comment-id:590077896 --> @ramsayleung commented on GitHub (Feb 23, 2020): As for ongoing plan to support `async/await`, I have talked with the author of `spotify-tui` on this [PR](https://github.com/ramsayleung/rspotify/pull/72), and everything is working in process now. Because my full time job is so damn busy, I have to take some extra time to support `async/await`, so please be patient :)
Author
Owner

@ghost commented on GitHub (Feb 23, 2020):

Sorry, i did not mean to rush you.
Understood. I'm looking forward to it. I would like to be helpful for it if I can.

<!-- gh-comment-id:590080499 --> @ghost commented on GitHub (Feb 23, 2020): Sorry, i did not mean to rush you. Understood. I'm looking forward to it. I would like to be helpful for it if I can.
Author
Owner

@ramsayleung commented on GitHub (Feb 23, 2020):

I think your work/branch is inspired, there are a lot of things I could learn from your work. I just push my WIP work to remote origin. Instead of creating a nonblocking package, I prefer to create a blocking package, and make nonblocking default.

<!-- gh-comment-id:590081604 --> @ramsayleung commented on GitHub (Feb 23, 2020): I think your work/branch is inspired, there are a lot of things I could learn from your work. I just push my WIP work to [remote origin](https://github.com/ramsayleung/rspotify/tree/ramsay/support-for-async-await). Instead of creating a `nonblocking` package, I prefer to create a `blocking` package, and make `nonblocking` default.
Author
Owner

@ramsayleung commented on GitHub (Feb 23, 2020):

I would like to be helpful for it if I can.

If you have time, you could help me to convert those endpoint functions to async/await version, I just update the internal functions to async, there are still a lot of endpoint functions that needs to update.
github.com/ramsayleung/rspotify@2ed4705679/src/spotify/client.rs (L172)
github.com/ramsayleung/rspotify@2ed4705679/src/spotify/client.rs (L207)

<!-- gh-comment-id:590087925 --> @ramsayleung commented on GitHub (Feb 23, 2020): > I would like to be helpful for it if I can. If you have time, you could help me to convert those endpoint functions to `async/await` version, I just update the internal functions to `async`, there are still a lot of endpoint functions that needs to update. https://github.com/ramsayleung/rspotify/blob/2ed470567990e0c2241e88db9c79afc5566f9b01/src/spotify/client.rs#L172 https://github.com/ramsayleung/rspotify/blob/2ed470567990e0c2241e88db9c79afc5566f9b01/src/spotify/client.rs#L207
Author
Owner

@ghost commented on GitHub (Feb 24, 2020):

will do.

<!-- gh-comment-id:590140891 --> @ghost commented on GitHub (Feb 24, 2020): will do.
Author
Owner

@ramsayleung commented on GitHub (Feb 24, 2020):

I just submit all the work Rspotify needs to do to support async/await, if you have time to join me, feel free to check it The workload of adding support for async/await

<!-- gh-comment-id:590362893 --> @ramsayleung commented on GitHub (Feb 24, 2020): I just submit all the work `Rspotify` needs to do to support `async/await`, if you have time to join me, feel free to check it [The workload of adding support for `async/await`](https://github.com/ramsayleung/rspotify/issues/79)
Author
Owner

@ghost commented on GitHub (Feb 25, 2020):

I started to modify endpoint functions to support async/await in client.rs. I will send PR when i finished to implement them. Please wait.

<!-- gh-comment-id:590729598 --> @ghost commented on GitHub (Feb 25, 2020): I started to modify endpoint functions to support `async/await ` in `client.rs`. I will send PR when i finished to implement them. Please wait.
Author
Owner

@ramsayleung commented on GitHub (Feb 25, 2020):

Perhaps you could send a new PR once you have finished to implement a endpoint function, or you could mark which endpoint function you are going to modify? just in case of any conflicting situation that we are both modifying the same endpoint function.

<!-- gh-comment-id:590800368 --> @ramsayleung commented on GitHub (Feb 25, 2020): Perhaps you could send a new PR once you have finished to implement a endpoint function, or you could mark which endpoint function you are going to modify? just in case of any conflicting situation that we are both modifying the same endpoint function.
Author
Owner

@ghost commented on GitHub (Feb 25, 2020):

oh, it has already been implemented.

<!-- gh-comment-id:590854900 --> @ghost commented on GitHub (Feb 25, 2020): oh, it has already been implemented.
Author
Owner

@ramsayleung commented on GitHub (Feb 28, 2020):

Rspotify has come to async/await, it's done.

<!-- gh-comment-id:592308929 --> @ramsayleung commented on GitHub (Feb 28, 2020): Rspotify has come to `async/await`, it's done.
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#24
No description provided.