Web API to list Idle Champions of the Forgotten Realms codes.
curl -s http://localhost:8000/v1/codes | jq '.codes | .[] | select(.expired == false).code'
curl -s -X PUT http://localhost:8000/v1/codes \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-Api-Key: API_KEY' \
--data-binary @- << EOF
{"code": "HELL-OWOR-LD!!",
"expires_at": 1806038430,
"creator_name": "Foo!",
"creator_url": "https://foo.creator.bar",
"submitter_name": "Bar!",
"submitter_url": "https://bar.submitter.bar"}
EOF
Contributions are welcome! Feel free to open an issue or submit a pull request.
To set up, we recommend the following:
- Familiarity with sqlx, rocket and postgresql are helpful.
- You will need a postgres service running, and that has the DB with migrations loaded:
db/migrations/*
- Optionally, import the seeds too:
db/dev_seeds.sql
- Optionally, import the seeds too:
- Create an env file at
.env
using the template file (.env.template
), - You might want to add a
Rocket.toml
Licensed under the following licenses at your option:
- Apache License, Version 2.0 <LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0>
- MIT license <LICENSE-MIT or https://opensource.org/licenses/MIT>
Files in the project may not be copied, modified, or distributed except according to those terms.