These are personal notes for future maintenance. They are intentionally direct.
- Keep this package small and predictable.
- The goal is to provide a thin wrapper around Riot endpoints, not an abstraction framework.
- Prefer explicit methods over clever generic request builders.
- Avoid breaking constructor behavior in
RiotAPIandDataDragon. - Keep method names stable unless there is a strong reason to change them.
- If a method signature changes, update:
src/types.tsREADME.mdsrc/test-endpoints.ts
- Source of truth is always
src/. dist/is build output, committed for npm consumers and transparency.- Keep strict typing on, and do not weaken it just to silence compiler warnings.
- Error messages should stay readable in terminal logs.
RiotAPIshould keep returning normalizedErrormessages.- Data Dragon wrappers should preserve the root error message.
- Multi-request methods exist because Riot rate limits are easy to hit.
- Keep pacing defaults conservative unless usage data says otherwise.
- If defaults change, call it out clearly in changelog and README.
- Run
npm run build - Run
npm test - Verify
README.mdexamples still match real method signatures - Verify
package.jsonpoints todist/index.jsanddist/index.d.ts - Commit source and matching
distoutput together
- Keep docs practical. Most users want a working snippet first.
- Do not overcomplicate return types until there is clear demand.
- If Riot deprecates an endpoint, mark it clearly and provide migration guidance.