Obtenir une seule série
Requête
$serie = $tcgdex->fetchSerie('swsh');
const serie = await tcgdex.fetch('series', 'swsh');
const serie = await tcgdex.fetch('series', 'swsh');
Serie serie = tcgdex.fetchSerie("swsh");
val serie = tcgdex.fetchSerie("swsh")
https://api.tcgdex.net/v2/fr/series/swsh
Exemple de réponse
Réponse 200
La requête retourne un objet Série
{ "id": "swsh", "logo": "https://assets.tcgdex.net/fr/swsh/swshp/logo", "name": "Épée et Bouclier", "sets": [ { "cardCount": { "official": 107, "total": 107 }, "id": "swshp", "logo": "https://assets.tcgdex.net/fr/swsh/swshp/logo", "name": "Promo SWSH", "symbol": "https://assets.tcgdex.net/univ/swsh/swshp/symbol" }, // ... { "cardCount": { "official": 159, "total": 230 }, "id": "swsh12.5", "logo": "https://assets.tcgdex.net/fr/swsh/swsh12.5/logo", "name": "Zénith Suprême" } ]}
Réponse 404
La série n’a pas été trouvée :( elle retournera un message d’erreur global (non traduit)
{ "error": "Endpoint or id not found"}