Latest version : 1.3.1

 Last updated on 2019-03-20T14:20:44.724Z

 Keywords : web, api, 7, days, to, die, alloc, fixes

 Downloads :

  • 160 in Last Month

 Links :


No examples found for this package


Build Status Coverage Status Docs NPM Snyk Vulnerabilities for npm package node

7 Days to die API wrapper

A simple wrapper around the web API from Alloc's fixes mod.

## Requirements

  • A 7 Days to Die server running Alloc's Fixes

The port required for this module is the same as the dynamic map page. For more info, see the documentation of the mod itself

## Example usage

Install with npm npm i 7daystodie-api-wrapper --only=prod

```js const SdtdApi = require('7daystodie-api-wrapper');

const sdtdServer = { ip: "", port: "8082", adminUser: "admin", adminToken: "secret" }


async function foo() { let stats = await SdtdApi.getStats(sdtdServer); console.log(The current ingame time is ${stats.gametime.days} days, ${stats.gametime.hours} hours and ${stats.gametime.minutes} minutes.) } ```

## Running tests

To run tests, you must have a working 7 Days to die server with allocs fixes installed. You must also have at least one player profile saved on the server (logging in once will do this).

Fill in the server connection info in a .env file (see example file) and then run npm test