3 ms·
Tangentially related - I wrote a C library for spotify's web api: https://gitlab.com/finnoleary/spotifyc https://gitlab.com/finnoleary/spotifyc I've been worki
by fao_ 7y ago
Tangentially related - I wrote a C library for spotify's web api: https://gitlab.com/finnoleary/spotifyc https://gitlab.com/finnoleary/spotifyc
I've been working on the cli client and shuffling things about directory wise so I don't think it compiles anymore atm. But the library works fine. Actually in retrospect I think I might revert and splt them into separate repos...
- thasian 7y agoMust've been a lot of work. I considered writing a library for the Web API in Swift, but there's just too much maintenance. There were also some weird bugs I encountered when parsing JSON like the time stamps being in the wrong format.
- fao_ 7y agoYeah. I just leave the json parsing up to the caller partly as a simplification, but also because I might accidentally discard data they want (Like, ideally that should never happen but our world is not ideal). The only thing it wraps is the authentication (to make life easier), and the web request. The C code is generated from a small python script that's generated directly from the documentation so it's relatively easy to keep up-to-date, the sacrifice is it is a bit more fragile than I like.
- bathtub365 7y agoThis is super interesting. I worked with Spotify’s original C SDK on iOS about 6 years ago. We ran into some issues with it aggressively loading playlists and metadata and running out of memory on large accounts. Some years later they put out a new iOS SDK that fixed all of the issues and was generally more of a native-feeling SDK on iOS, long after the project had been scrapped. Is this at all related or inspired by their original C SDK?