a rest api for cmangos database
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
crito 974f0616f3 add character's guild information 3 months ago
cmangos add character's guild information 3 months ago
contrib introduce logger package 3 months ago
modules add character's guild information 3 months ago
sql rename wow-api to cmangos-api 3 months ago
.gitignore add authentication system 3 months ago
LICENSE add AGPLv3 license file 3 months ago
Makefile add authentication system 3 months ago
README.md add initial instructions 3 months ago
main.go add character's guild information 3 months ago

README.md

cmangos-api

a rest api for the cmangos core database.

api

examples

create account

Based on the config the Authorization header has to be set to a invite token. Set needInvite in contrib/config.ini.dist.

curl \
  -X POST \
  --header "Authorization: Token <invite-token>" \
  --header "Content-Type: application/json" \
  --data '{"username":"test","password":"test","repeat":"test","email":"test@example.org"}' \
  http://127.0.0.1:5556/account

To create an invite token you have to authenticate yourself first.

curl \
  -X POST \
  --user "<username>:<password>" \
  http://127.0.0.1:5556/account/auth

You will receive a X-Auth-Token header containing a token for further requests.

curl \
  -X POST \
  --header "Authorization: Token <token>" \
  http://127.0.0.1:5556/account/invite