I recently recovered my Last.fm account, which was one of the top music services before Spotify or streaming in general. It says my account has been around since 2010, thus the cringy username
xthekingisdeadx. My profile picture and username still stay the same.
I want to retrieve my Last.fm data, particularly from my top artists and albums I have listened to for the past week or month. So I could share it somewhere.
I am going to write my script using Go. I started this project in Python but encountered a couple of errors and I am just not in the mood to debug or solve them. Weekend projects should be fun, no?
So far so good, script compiled. Now I can retrieve the data, but no parsing yet. Time to Google, “golang parse JSON”.
Since I only have very minimal experience with the Go language, I am not sure what my next steps are. Either, I will go with the GUI toolkit route or image manipulation.
Switching to SwiftUI
After researching Go UI frameworks, I eventually decided to use what I am currently familiar and, that is SwiftUI. Another reason is the sad state of native UI frameworks using the Go language because it seems they aren’t many options available. I don’t want to use cross-platforms or UI frameworks using web technologies for this is just a simple project.
One hour later
LazyHGrid, this is what it looks like now.
My next step would be to be able to export this whole
View into an image.
Code can be found here: https://github.com/lawgimenez/lastfmdata