API Documentation
Routes
Oracles IndexGET /api/oracles/
Returns all oracle roll tables and their metadata.
Single OracleGET /api/oracles/[slug]
Returns a single oracle roll table and its metadata, by the oracle slug. Oracle slug can be obtained from the orcales index route, or by referencing the url of the oracle in the app.
Eg. GET api/oracles/action
fetches the same oracle data presented at /oracles/action
in the app.
Oracle ResultGET /api/oracles/[slug]/[value]
Returns a single oracle table result and corresponding roll, by the table index. Index value can be determined by referencing oracle.results
from the orcale metadata, or by referencing "runic charts" in the app and subtracting 1 from those values.
Eg. GET api/oracles/action/0
returns {"roll":1,"result":"Scheme"}
Oracle RollGET /api/oracles/[slug]/random
Returns a single oracle table result and corresponding roll, at random. Random values are generated by random-js using the nativeMath PRNG (ie. based on Math.random()).