Skip to content

Commit 3ba9adc

Browse files
authored
Merge pull request #3 from exec-astraea/docs/sources-and-credits
docs: credit upstream sources, add AGPL-3.0, fix seriaati misattribution
2 parents cc67e60 + ae9e138 commit 3ba9adc

6 files changed

Lines changed: 723 additions & 28 deletions

File tree

AGENTS.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ Codes are pulled from up to three APIs and merged/de-duplicated, so a hiccup on
99
one source doesn't cause a miss. A source is skipped for any game it doesn't
1010
serve (empty slug), and it only errors when *every* attempted source fails:
1111

12-
- [ennead.cc](https://api.ennead.cc/mihoyo)`/<game>/codes` (HoYoverse only)
13-
- [torikushiii/hoyoverse-api](https://github.com/torikushiii/hoyoverse-api)`hoyo-codes.seria.moe` (HoYoverse only)
12+
- [torikushiii/hoyoverse-api](https://github.com/torikushiii/hoyoverse-api)
13+
`api.ennead.cc/mihoyo/<game>/codes` (HoYoverse only)
14+
- [seriaati/hoyo-codes](https://github.com/seriaati/hoyo-codes)
15+
`hoyo-codes.seria.moe` (HoYoverse only)
1416
- **OpenGachaCodes** — self-hosted read-only API (`opengachaBaseUrl` config).
1517
Supplements the HoYo games it also serves and is the **sole** source for
1618
non-HoYo games like Wuthering Waves. Disabled when `opengachaBaseUrl` is unset.
@@ -202,9 +204,10 @@ When adding a config knob: add it to `fileConf`, resolve/validate it in
202204

203205
## Upstream APIs
204206

205-
- **ennead** — `https://api.ennead.cc/mihoyo/<slug>/codes`, slugs `genshin`,
206-
`starrail`, `zenless`, `honkai`. Shape: `{"active":[{"code","rewards":[...]}],"inactive":[...]}`.
207-
- **torikushiii** — `https://hoyo-codes.seria.moe/codes?game=<slug>`, slugs
207+
- **ennead** (torikushiii/hoyoverse-api) — `https://api.ennead.cc/mihoyo/<slug>/codes`,
208+
slugs `genshin`, `starrail`, `zenless`, `honkai`.
209+
Shape: `{"active":[{"code","rewards":[...]}],"inactive":[...]}`.
210+
- **seria** (seriaati/hoyo-codes) — `https://hoyo-codes.seria.moe/codes?game=<slug>`, slugs
208211
`genshin`, `hkrpg`, `nap`, `honkai3rd`. Shape: `{"codes":[{"code","rewards":"A*60;B*5"}]}`
209212
(active only). Rewards get normalized (`A*60;B*5` → `A ×60, B ×5`).
210213
- **OpenGachaCodes** — `<opengachaBaseUrl>/games/<slug>/codes`, slugs `genshin`,
@@ -215,10 +218,10 @@ When adding a config knob: add it to `fileConf`, resolve/validate it in
215218
use ASCII `x`, not `×`; they're joined with `, ` as-is. `fetchOpengacha` lives
216219
in `sources.go`; the base URL is `opengachaBaseUrl` in config.
217220

218-
The internal key differs from the torikushiii slug for Star Rail (`hsr`/`hkrpg`)
221+
The internal key differs from the seria slug for Star Rail (`hsr`/`hkrpg`)
219222
and Zenless (`zzz`/`nap`). Per-source slugs live in `games.go`; a `Game` sets a
220223
slug to `""` for any source that doesn't serve it (e.g. `wuwa` has empty
221-
`Ennead`/`Tori` and is OpenGachaCodes-only), and `fetchCodes` skips empty-slug
224+
`Ennead`/`Seria` and is OpenGachaCodes-only), and `fetchCodes` skips empty-slug
222225
sources. To add another game, add one entry to the `games` map **and** to
223226
`gameOrder`; nothing else needs to change. A game whose only source is
224227
OpenGachaCodes **fails startup** if `opengachaBaseUrl` is unset (it could never

0 commit comments

Comments
 (0)