JSON-LD / RDF support
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Tranquilla
- Ambito
- api, backend-api-design
Direzione di ricerca
L’issue non indica file del repository, test o punti di ingresso. Inizia tracciando il modo in cui l’API gestisce gli header Accept e i formati delle risposte, quindi determina la rappresentazione JSON-LD e l’ambito dell’ontologia. Il lavoro sarà considerato completato quando saranno disponibili un piano di implementazione concordato e il supporto per la forma JSON-LD richiesta.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
I think it would be valuable to be able to use a PokéAPI endpoint as a canonical URL within RDF linked data, so other RDF documents can refer to Pokémon concepts. For example, someone could make character bios using JSON-LD that look like:
{
"@context": {
"@vocab": "https://schema.org/",
"pkmn": "https://pokemonkg.org/ontology/version/1.0.0"
},
"@id": "<...>",
"@type": "Person",
"name": "Meowth",
"description": "Team Rocket's Meowth",
"url": "https://bulbapedia.bulbagarden.net/wiki/Meowth_(Team_Rocket)",
"pkmn:species": { "@id": "https://pokeapi.co/api/v2/pokemon-species/meowth" },
"gender": { "@id": "https://schema.org/Male" },
"memberOf": {
"@type": "Organization",
"name": "Team Rocket",
"url": "https://bulbapedia.bulbagarden.net/wiki/Team_Rocket"
},
"knows": {
"@id": "<...>",
"@type": "Person",
"name": "Meowzie",
"url": "https://bulbapedia.bulbagarden.net/wiki/Meowzie",
"pkmn:species": { "@id": "https://pokeapi.co/api/v2/pokemon-species/meowth" },
"gender": { "@id": "https://schema.org/Female" }
}
}
This would be very useful for creating original characters in a somewhat-standard machine-readable format, e.g. for use in TTRPG campaigns.
Some notes:
- There is a readily available Pokémon ontology for RDF, but we could extend it or make our own for PokéAPI if it doesn't have all the features we need.
- In the example above, I used the
Persontype from Schema.org (https://schema.org/Person) as it integrates with the rest of the Schema.org ontology - for example, theCreativeWork.characterproperty takes aPersonas its value to represent a character within a creative work. However, the Comic Book Ontology also provides a dedicatedCharactertype (https://comicmeta.org/cbo/#Character).
Similar to MusicBrainz, a client could request the JSON-LD for a Pokémon concept by modifying its HTTP request in the following form:
GET /api/v2/pokemon-species/meowth HTTP/2
Host: pokeapi.co
Accept: application/ld+json
or alternatively append ?format=json-ld to the resource URL.
- Lingua principale
- Python
- Stelle
- 5.4k
- Fork
- 1.2k
- Merge medio
- 2g 4h
- PR unite (30g)
- 18
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di PokeAPI/pokeapi
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
Incorrect Omega Ruby and Alpha Pokémon Version Group Name in Sprites and Pokémon Form Sprites Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Blank past ability entries Aperta
Difficoltà 2/5 1-2 giorni Idoneità per principianti 76/100
-
openapi integers range. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
-
UV hardlink files Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
Tutte le issue di PokeAPI/pokeapi
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
gradio-app/gradio#13895 ·
-
build-error
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
spack/spack-packages#6713 ·
-
Use issue templates Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
ActivityWatch/activitywatch#1464 · 1 reazione ·
-
[Bug]: The ckg tool drops the return type of every decorated Python method in class search results Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
bytedance/trae-agent#483 ·