Skip to content

conductrics/conductrics-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Conductrics API

Installation

npm install conductrics-api

Usage

Conductrics = require("conductrics-api")

# Set an optional global API url
Conductrics.baseUrl = "https://api.conductrics.com"

agent = new Conductrics.Agent("my-agent-name")
  .apiKey("my-api-key")
  .ownerCode("my-owner-code")

# 1. Make decisions.
agent.decide sessionId, [ 'a', 'b', 'c'] , (err, decision) ->
  assert decision in [ 'a', 'b', 'c' ]

# 2. Send rewards.
agent.reward sessionId, 1.2, (err, result) ->
  assert result is 1.2

# 3. Profit (literally)

Please see the full documentation, for more information on everything you can do with the Conductrics API.

About

NodeJS wrapper for using Conductrics API on the server.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •