Get Track History
curl --request GET \
--url http://localhost:1234/api/tracks/historyconst options = {method: 'GET'};
fetch('http://localhost:1234/api/tracks/history', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'http://localhost:1234/api/tracks/history';
const options = {method: 'GET'};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "http://localhost:1234/api/tracks/history"
response = requests.get(url)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:1234/api/tracks/history"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}val client = OkHttpClient()
val request = Request.Builder()
.url("http://localhost:1234/api/tracks/history")
.get()
.build()
val response = client.newCall(request).execute()HttpResponse<String> response = Unirest.get("http://localhost:1234/api/tracks/history")
.asString();Endpoints
Get Track History
Get a list of previously played tracks
GET
/
api
/
tracks
/
history
Get Track History
curl --request GET \
--url http://localhost:1234/api/tracks/historyconst options = {method: 'GET'};
fetch('http://localhost:1234/api/tracks/history', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'http://localhost:1234/api/tracks/history';
const options = {method: 'GET'};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "http://localhost:1234/api/tracks/history"
response = requests.get(url)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:1234/api/tracks/history"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}val client = OkHttpClient()
val request = Request.Builder()
.url("http://localhost:1234/api/tracks/history")
.get()
.build()
val response = client.newCall(request).execute()HttpResponse<String> response = Unirest.get("http://localhost:1234/api/tracks/history")
.asString();JSON Response
- Success
- Error
null
required
Example Response
{
data: {
"beyoncfreedomfeatkendricklamarlemonade": {
id: "beyoncfreedomfeatkendricklamarlemonade",
hash: "QmV5b25jQzNBOUZyZWVkb20yMGZlYXQyMEtlbmRyaWNrMjBMYW1hckxlbW9uYWRl",
lastPlayedTimestamp: 1776990890021,
title: "Freedom%20(feat.%20Kendrick%20Lamar)",
artist: "Beyonc%C3%A9",
album: "Lemonade",
imageUrl: "https://is1-ssl.mzstatic.com/image/thumb/Music115/v4/db/25/a1/db25a1c0-8a4a-3b4d-226d-7c7704dc92da/886447680711.jpg/640x640sr.jpg",
trackUrl: "https://music.apple.com/us/album/freedom-feat-kendrick-lamar/1460430561?i=1460430752",
genres: [
"Pop"
],
provider: "cider",
has_controls: true
},
...
},
error: null
}
⌘I

