An open API service indexing awesome lists of open source software.

https://github.com/dofusdude/doduapi

Open Dofus Encyclopedia API
https://github.com/dofusdude/doduapi

api dofus dofus-api dofus-data items

Last synced: about 2 months ago
JSON representation

Open Dofus Encyclopedia API

Awesome Lists containing this project

README

          



doduapi


Open Dofus Encyclopedia API


Try it!





## Public Instance

The dofusdude server is always running with the latest Dofus version and it is highly recommended to use its public endpoints at `https://api.dofusdu.de/`. Try them out [here](https://docs.dofusdu.de) and use the SDKs for real development.

- [Javascript](https://github.com/dofusdude/dofusdude-js) `npm i dofusdude-js --save`
- [Typescript](https://github.com/dofusdude/dofusdude-ts) `npm i dofusdude-ts --save`
- [Go](https://github.com/dofusdude/dodugo) `go get -u github.com/dofusdude/dodugo`
- [Python](https://github.com/dofusdude/dofusdude-py) `pip install dofusdude`
- [Java](https://github.com/dofusdude/dofusdude-java) Maven with GitHub packages setup

## Self-Hosting

If you want to host `doduapi` yourself, just follow these commands.

```shell
# Prepare search engine environment
export MEILI_MASTER_KEY=supersecretandhighlysecurekey
echo "MEILI_MASTER_KEY=$MEILI_MASTER_KEY" > .env

# Install and run search engine
curl -L https://install.meilisearch.com | sh
./meilisearch --master-key $MEILI_MASTER_KEY &

# Install and run doduapi
curl -s https://get.dofusdu.de/doduapi | sh
doduapi migrate up
doduapi
```
You can get the search engine process back with `fg` later.

## Configuration

Open the `.env` with your favorite editor. Add more parameters if you want. Here is a full list.

```shell
MEILI_MASTER_KEY= # a random string that must be the same in the meilisearch.service file or parameter
DIR= # directory where the ./data dir can be found
DOFUS_VERSION=3.0.40.28 # must match a name from https://github.com/dofusdude/dofus3-main/releases
API_SCHEME=http # http or https. Just used for building links
API_HOSTNAME=localhost # the hostname of the api. Just used for building links
API_PORT=3000 # the port where to listen on
MEILI_PORT=7700 # the port where meilisearch is listening on
MEILI_PROTOCOL=http # http or https
MEILI_HOST=127.0.0.1 # the hostname of meilisearch
PROMETHEUS=false # enable prometheus metrics export running on one apiport + 1
FILESERVER=true # will tell doduapi to serve the image files itself
ALMANAX_MAX_LOOKAHEAD_DAYS=365 # maximum date range size
ALMANAX_DEFAULT_LOOKAHEAD_DAYS=6 # default date range size
IS_BETA=false # main (false) vs beta (true)
UPDATE_HOOK_TOKEN=secret # /update/ will trigger an update with a POST request {"version": ""}
```

## Known Problems

Run `doduapi` with `--headless` in a server environment to avoid "no tty" errors.