Text
Finally got OAuth working!!!!
The war is over. Figured out the hard way that OAuth makes the routes for you <3
Now I can start coming up with models to store the data from users. If anyone has any ideas on how I should make those relationships with other data tables for songs and artists let me know. I’m going to reblog this post with some of my own ideas.
I also have a login page and dashboard with hard coded data to get a sense of what I want the backend to supply. Good progress! Will also reblog with pictures of that.
#coding#software engineering#baby coder#web developers#web development#nodejs#ruby#spotify api#reactjs#ruby on rails#software development#full stack developer
4 notes
·
View notes
Text
Progress:
Okay so the authentication for spotify is hard for me to understand and requires user authentication, then making a token request that while expire in an hour. So i focused on what I did know how to do and what I had access to token wise. The Spotify developer home page has a temporary access token for demos. I took that token and made a function to make get request to the API and two functions for top tracks and top artists. Then made some functions to print them in my terminal. Here is what my end product looked like in the terminal.
The data for tracks is proving to just show a years worth of listening even though I specified long_term in my get request.
Here is my code:
I tried just doing track.artist but Spotify handles that as multiple artists so I had to handle them as such.
Next Steps: Tackling the user authentication and token requests and including it in this code.
(Also yes I know that is a concerning amount of My Chemical Romance tracks. I had my MCR phase strike up again with a passion last October and I am still balls deep in it.)
#coding#baby coder#web developers#spotify api#software engineering#web development#javascript#nodejs#node-fetch#terminal app#visual studio code#vs code#backend#frontend#my chemical romance#the weakerthans#u2#modern baseball#pup the band#oasis#wilco#misfits#descendents#programmer#programming#github#developers
11 notes
·
View notes
Text
Stuck: JavaScript file
My goal is to just make and API call in a JavaScript file and get the info in my terminal.
For some reason though, my token isn't working. I took a look at the documentation and figured I needed to use the client ID and secret to make a request for an access token. After adding that into my script file I'm still getting a error about needing valid user authentication.
The token I was using before w.as a temporary one in the Spoify dev website. So I can't hardcode that. So trying to figure out the right way to get that token :P
5 notes
·
View notes
Text
Progress: Accessed top 10 albums, tracks, and artists in terminal
I used this command in terminal:
curl -X GET "https://api.spotify.com/v1/me/top/artists?limit=10" -H "Authorization: Bearer TOKEN" (I wish tumblr had code embeds like Notion)
I used this command but with tracks and albums as well. I found the data provided with each call super interesting. Songs include their available markets and all of the album attributes. I noticed there isn't a base attribute of the artist. That is stored inside of the album section. There is also some repeat information within the track section for artists (to account for collaboration tracks on a single artist album).
Very fascinating to see how the data is formatted for the Spotify application.
Thank you to @itsorvit, who mentioned using the curl command in terminal!
Next Steps:
See if I can implement this into an xbar plugin on my macbook menu bar!
If anyone has experience in xbar plugin stuff I'd love some guidance or tips!
#coding#software engineering#api#xbar#spotify#baby coder#web development#web developers#computer science#software development#ruby#javascript#xbar plugin
1 note
·
View note
Text
First Steps:
So I want to learn how to get access to the spotify api and my data first in my terminal. So I want to:
Get my top albums in terminal
Get my top artists in terminal
Get my top songs in terminal
If I figure it out really quick:
Add that json data into an xbar project on my Macbook
If that is easy then I'll add more stuff for when you click on xbar
#programmer#software engineering#software#code#coding#codeblr#website development#web developers#web design#baby coder#I know how to do nothing I just learned how to access APIs and make crude Ruby on Rails apps#ruby on rails#ruby
8 notes
·
View notes
Text
This will be my blog for logging my Spotify statistics website progress :D
Things I want to do for this project:
Show my top 300 artists
Show my top 300 songs
Show my top 50 genres
Show my top 100 albums
Bio page about me
Display my Spotify profile picture
I have made a Spotify developer account and gotten an API key. I'm now just scouring the documentation to try and tackle getting access to my personal Spotify stats (I could just download my listening history but I really want to have my website update).
2 notes
·
View notes