const getCode = async (type: string) => {
const res = await fetch(`https://hoyoverse-gifts.deno.dev/gifts/${type}`)
if (!res.ok) throw await res.json()
return await res.json() // {codes: []}
}
[GET]
/doc
OpenApi schema- Try on playground
File
>Import URL
>https://hoyoverse-gifts.deno.dev/doc
- Try on playground
[GET]
/gifts/:type
Endpoint (JSON) | Redeem Code |
---|---|
/gifts/genshin |
Genshin Impact |
/gifts/hsr |
HSR |
/gifts/afkArena |
- |
/gifts/stateOfSurvival |
- |
/gifts/idleHeroes |
- |
/gifts/leftToSurvive |
- |
/gifts/riseOfKingdoms |
- |
/gifts/soulKnight |
- |
/gifts/lordsMobile |
- |
/gifts/watcherOfRealms |
- |