Spotify-Playground / spotify-API

0 stars 0 forks source link

[Spotify] 앨범 - API request용 curl 명령어 목록 #9

Open hooniegit opened 11 months ago

hooniegit commented 11 months ago

🔎 About

앨범 정보의 API request를 위한 curl 명령어들을 정리합니다.

hooniegit commented 11 months ago
$ curl --request GET \
  --url https://api.spotify.com/v1/albums/[앨범_ID] \
  --header 'Authorization: Bearer [API_접속_토큰]'
hooniegit commented 11 months ago
$ curl --request GET \
  --url 'https://api.spotify.com/v1/albums?ids=[앨범_ID]%[앨범_ID]%[앨범_ID] \
  --header 'Authorization: Bearer [API_접속_토큰]'
hooniegit commented 11 months ago
$ curl --request GET \
  --url https://api.spotify.com/v1/albums/[앨범_ID]/tracks \
  --header 'Authorization: Bearer [API_접속_토큰]'
?offset=[시작_인덱스] : default 0
?limit=[표기_데이터_수] : default 20
hooniegit commented 11 months ago
$ curl --request GET \
  --url https://api.spotify.com/v1/me/albums \
  --header 'Authorization: Bearer [API_접속_토큰]'
?offset=[시작_인덱스] : default 0
?limit=[표기_데이터_수] : default 20
hooniegit commented 11 months ago
$ curl --request PUT \
  --url 'https://api.spotify.com/v1/me/albums?ids=[앨범_ID]%[앨범_ID]%[앨범_ID]' \
  --header 'Authorization: Bearer [API_접속_토큰]' \
  --header 'Content-Type: application/json' \
  --data '{
    "ids": [
        "string"
    ]
}'
$ curl --request PUT \
  --url 'https://api.spotify.com/v1/me/albums \
  --header 'Authorization: Bearer [API_접속_토큰]' \
  --header 'Content-Type: application/json' \
  --data '{
    "ids": [
        "[앨범_ID]", "[앨범_ID]", "[앨범_ID]"
    ]
}'
hooniegit commented 11 months ago
$ curl --request DELETE \
  --url 'https://api.spotify.com/v1/me/albums?ids=[앨범_ID]%[앨범_ID]%[앨범_ID]' \
  --header 'Authorization: Bearer [API_접속_토큰]' \
  --header 'Content-Type: application/json' \
  --data '{
    "ids": [
        "string"
    ]
}'
$ curl --request DELETE \
  --url 'https://api.spotify.com/v1/me/albums \
  --header 'Authorization: Bearer [API_접속_토큰]' \
  --header 'Content-Type: application/json' \
  --data '{
    "ids": [
        "[앨범_ID]", "[앨범_ID]", "[앨범_ID]"
    ]
}'
hooniegit commented 11 months ago
$ curl --request GET \
  --url 'https://api.spotify.com/v1/me/albums/contains?ids=[앨범_ID]%[앨범_ID]%[앨범_ID]' \
  --header 'Authorization: Bearer [API_접속_토큰]'