nra

node-revlobot-api

A node module to interact with the RevloBot API

Showing:

Popularity

Downloads/wk

2

Maintenance

No Maintenance Data Available

Package

Dependencies

1

Size (min+gzip)

190.5KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

node-revlobot-api

A Node.js module to interact with the RevloBot API

#Installation npm i --save node-revlobot-api

#Usage

const revlo = require('node-revlobot-api')('YOUR_API_KEY_HERE');

revlo.get.rewards().then(data => {
  console.log(data);
  // Do stuff
}, console.error);

Get Rewards

Query Parameters:

  • page: Number - Page number to fetch (Optional, default is 1)
revlo.get.rewards({
  page: 1,
}).then(data => {
  console.log(data);
  // Do stuff
}, console.error);

##Get Redemptions

Query Parameters:

  • page: Number - Page number to fetch (Optional, default is 1)
  • completed: Boolean - Results include completed redemptions (Optional)
  • refunded: Boolean - Results include refunded redemptions (Optional)
  • reward_id: Number - Reward ID to fetch (Optional)
revlo.get.redemptions({
  page: 1,
  completed: false,
  refunded: false,
}).then(data => {
  console.log(data);
  // Do stuff
}, console.error);

##Get Redemption by ID

Query Parameters:

  • id: Number - Redemption ID to fetch (Required)
revlo.get.redemption(id).then(data => {
  console.log(data);
  // Do stuff
}, console.error);

##Modify Redemption by ID

Query Parameters:

  • id: Number - Redemption ID to modify (Required)
  • completed: Boolean - Set the redemption's completed status (Optional)
revlo.patch.redemption(id, {
  completed: true,
}).then(data => {
  console.log(data);
  // Do stuff
}, console.error);

##Get Points

Query Parameters:

  • username: String - Username to get point for (Required)
revlo.get.points(username).then(data => {
  console.log(data);
  // Do stuff
}, console.error);

##Add/Remove Bonus Points

Query Parameters:

  • username: String - Username to get point for (Required)
  • amount: Number - Amount to shift Bonus Points by +/- (Required)
revlo.post.bonus(username, {
  amount: 100,
}).then(data => {
  console.log(data);
  // Do stuff
}, console.error);

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100