Let's make everything iterable

Iterate through pagination in the Rest API 1 Preface About 4 months ago, icewind1991 created an exciting PR that adding Stream/Iterator based versions of methods with paginated results, which makes enpoints in Rspotify more much ergonomic to use, and Mario completed this PR. In order to know what this PR brought to us, we have to go back to the orignal story, the paginated results in Spotify’s Rest API. 2 Orignal Story Taking the artist_albums as example, it gets Spotify catalog information about an artist’s albums....

April 29, 2021 · 5 min · 1004 words · Ramsay Leung

Serde Tricks

The lesson learned from refactoring rspotify 1 Preface Recently, I and Mario are working on refactoring rspotify, trying to improve performance, documentation, error-handling, data model and reduce compile time, to make it easier to use. (For those who has never heard about rspotify, it is a Spotify HTTP SDK implemented in Rust). I am partly focusing on polishing the data model, based on the issue created by Koxiaet. Since rspotify is API client for Spotify, it has to handle the request and response from Spotify HTTP API....

December 13, 2020 · 10 min · 2007 words · Ramsay Leung

rspotify has come to async/await

1 Preface Today, I am exited to introduce you the v0.9 release I have been continued to work on it for the past few weeks that adds async/await support now! 2 The road to async/await What is rspotify: > For those who has never heared about rspotify before, rspotify is a Spotify web Api wrapper implemented in Rust. With async/await’s forthcoming stabilization and reqwest adds async/await support now, I think it’s time to let rspotify leverage power from async/await....

February 28, 2020 · 3 min · 432 words · Ramsay Leung