A module-based implementation of the DevWars API, designed to be pulled into a project and easily used.
- Nodejs: 12.0 or higher
Run npm install
to install dependent node_modules.
First, you must ensure that the given Axios client is pre-configured with the required base URL and any additional properties required. Since the API will work from the base address and not the full address.
const axiosClient = axios.create({ baseURL: "http://localhost:8080" });
const api = new DevWarsApi(axiosClient);
await api.games.createGame({
startDate: new Date(),
season: 3,
mode: "Classic",
title: "StarWars Shop",
status: 3,
templates: {},
});
Sometimes is important to provide a given value within the body for all valid requests that use it. This can be done by setting the static body on the DevWars client.
DevWarsApi.body = { apiKey: "important-key" };
This project exists thanks to all the people who contribute. We encourage you to contribute to DevWars but ensure to open a related issue first. Please check out the contributing to DevWars guide for guidelines about how to proceed.
You can check out the full license here
This project is licensed under the terms of the MIT license.