Ait
2009
punkreggaeblues
Overview
albums / #24
2009
Ait
2009
Request
curl example
curl -sS \ "https://example-data.com/api/v1/albums/24" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/albums/24" ); const album = await res.json();
TypeScript example
// Download once: mkdir -p types && curl -o types/albums.d.ts https://example-data.com/types/albums.d.ts
import type { Album } from "./types/albums";
const res = await fetch(
"https://example-data.com/api/v1/albums/24"
);
const album = (await res.json()) as Album; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/albums/24"
)
album = res.json() Response
{
"id": 24,
"artistId": 10,
"title": "Ait",
"slug": "ait-24",
"releaseDate": "2009-11-16",
"trackCount": 8,
"durationSeconds": 3087,
"genres": [
"punk",
"reggae",
"blues"
],
"coverUrl": "https://picsum.photos/seed/album-24/500/500",
"createdAt": "2023-05-30T20:48:33.460Z"
}