Coder Social home page Coder Social logo

d2-armory-api's Introduction

d2 armory api

The armory backend is responsible for storing and parsing d2s characters. It also exposes an HTTP API to get characters as JSON.


Environment variables

Name Default
HTTP_ADDRESS :80
MONGO_HOST mongodb:27017
MONGO_DB armory
MONGO_USERNAME
MONGO_PASSWORD
D2S_PATH
CACHE_DURATION 3m
STATISTICS_USER
STATISTICS_PASSWORD
CORS_ENABLED false
LOG_REQUESTS false

API

Get a character by name

Gets the character by name, either served through the mongoDB cache or by parsing the d2s binary if the cache duration has expired.

GET /api/v1/characters?name=nokka

Deprecated handler for consumers who rely on it

Deprecated handler used by < v1.0.0 users.

GET /retrieving/v1/character?name=nokka

Health check

GET /health

Package dependency graph

Package dependency graph

How to generate the graph

godephgraph is used to generate the dependency graph.

$ godepgraph -nostdlib -novendor -horizontal -onlyprefixes=github.com/nokka/d2-armory-api github.com/nokka/d2-armory-api/cmd/server | dot -Tpng -o docs/godepgraph.png

Data storage

The armory API relies on mongodb to store the data.

d2-armory-api's People

Contributors

nokka avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.