Skip to content

survarium/survarium-api-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Survarium-api-client Build Status

API client for Survarium game.
This is a port of initial PHP-client.

Docs

API handlers

Requirements

  • nodejs >= 4

Install

Import it into your project via package.json dependencies

"survarium-api-client": "git+https://github.com/survarium/survarium-api-client.git"

Usage

See example

Configuration

Environment variables are

  • SV_API – API host [default=http://api.survarium.com/]
  • SV_API_PUBKEY – API public key [default=test]
  • SV_API_PRIVKEY – API private key [default=test]
  • SV_API_RETRIES – amount of retries in case of network or api error [default=10]
  • SV_API_DELAY_MIN – min delay for api request [delay mode] and base number for retry pause [default=20]
  • SV_API_DELAY_MAX – max delay for api request [delay mode] and incremental base for retry pause [default=200]
  • SV_API_DELAY_MODE – enable quering in delay mode (requests delayed before starts, possible parallel requests) [default=false]
  • SV_API_STACK_MODE – enable quering in stack mode (each request may be runned only after previous been resolved) [default=false]
  • SV_API_SAVE_SOURCE – save RAW JSON response to target directory (trailing slash required)[default=false]
  • DEBUG – show debug messages (survarium-api-client) [default=false]

About

Library for fetching data from native API methods

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published