-
Notifications
You must be signed in to change notification settings - Fork 0
/
get_data.sh
executable file
·31 lines (21 loc) · 954 Bytes
/
get_data.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env bash
# put your OAuth token, obtained from get_oauth.sh, into the variable below
token=""
###### query to get a single track
#curl --request GET \
# 'https://api.spotify.com/v1/tracks/2TpxZ7JUBn3uw46aR7qd6V' \
# --header "Authorization: Bearer ${token}"
#curl --request GET \
# 'https://api.spotify.com/v1/tracks/11dFghVXANMlKmJXsNCbNl' \
# --header "Authorization: Bearer ${token}"
###### query to get a playlist of tracks
# Viral 50 (daily) - USA
# https://open.spotify.com/playlist/37i9dQZEVXbKuaTI1Z1Afx?si=b68b10305177484b
# Top 50 (daily) - USA
# https://open.spotify.com/playlist/37i9dQZEVXbLRQDuF5jeBp?si=edb45e0aa91e415b
# Top 50 (weekly) - USA
# https://open.spotify.com/playlist/37i9dQZEVXbLp5XoPON0wI?si=d61fd9e600544c57
curl -X "GET" "https://api.spotify.com/v1/playlists/37i9dQZEVXbLp5XoPON0wI" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${token}"