An alternative API of jsr.io.
API endpoint: https://jsr-api.sxzz.moe/
API service for https://shields.io/badges/endpoint-badge.
- URL:
/badge/<@scope>/<pkg>
- Method:
GET
- Response: see https://shields.io/badges/endpoint-badge
- Example: https://jsr-api.sxzz.moe/badge/@luca/flag
[![jsr](https://img.shields.io/endpoint?url=https%3A%2F%2Fjsr-api.sxzz.moe%2Fbadge%2F%40<scope>%2F<pkg>)](https://jsr.io/@<scope>/<pkg>)
Replace <scope>
and <pkg>
with the package's scope (without @
) and name.
- URL:
/version/<@scope>/<pkg>
- Method:
GET
- Response:
{ "version": "1.0.0" }
- Example: https://jsr-api.sxzz.moe/version/@luca/flag
[{ "error": "Package not found" }, { "error": "Unknown error" }]
- URL:
/versions/<@scope>/<pkg>
- Method:
GET
- Response:
["0.0.0", "0.0.1"]
- Example: https://jsr-api.sxzz.moe/versions/@luca/flag
[{ "error": "Package not found" }, { "error": "Unknown error" }]