JSON-LD / RDF support
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Ít trao đổi
- Lĩnh vực
- api, backend-api-design
Hướng nghiên cứu
Issue không nêu tên các tệp trong repository, các bài kiểm thử hoặc các entry point. Hãy bắt đầu bằng cách truy vết cách API xử lý các header Accept và các định dạng phản hồi, sau đó xác định biểu diễn JSON-LD và phạm vi của ontology. Công việc được xem là hoàn tất khi có một kế hoạch triển khai đã được thống nhất và hỗ trợ cho dạng JSON-LD được yêu cầu.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Python
- Star
- 5.4k
- Fork
- 1.2k
- Merge trung bình
- 2 ngày 12 giờ
- Pull request đã merge (30 ngày)
- 18
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của PokeAPI/pokeapi
-
Blank past ability entries Đang mở
Độ khó 2/5 1-2 ngày Mức phù hợp với người mới 76/100
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
-
openapi integers range. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
-
UV hardlink files Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
-
Ball legality Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Tất cả issue của PokeAPI/pokeapi
Issue tương tự
-
agent-ready documentation needs-triage
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
-
documentation
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 91/100
-
workflow-status page template still says reusable workflows are "triggered only by workflow_call:" Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
-
Add https://search.jeremyh.xyz/ Đang mởinstance instance add
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
searxng/searx-instances#939 · 1 bình luận ·
-
area-deployment area-integrations triage:bot-seen
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 86/100