-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Usage API #22
Added Usage API #22
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @JamesFrost
Thanks a lot for making these changes and adding new features! I left a few comments, can you look into them please?
Best,
Dirk
return; | ||
} | ||
|
||
if( typeof body !== 'undefined' ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please wrap this statement in curly brackets
lib/usage.js
Outdated
if( typeof body !== 'undefined' ) | ||
body = JSON.parse( body ); | ||
|
||
if (response.statusCode >= 200 && response.statusCode < 300) cb(null, body); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please wrap this statement in curly brackets
@@ -2,11 +2,15 @@ var EventEmitter = require('events').EventEmitter, | |||
JSONParser = require('./JSONParser').JSONParser, | |||
util = require('util'), | |||
GnipRules = require('./rules'), | |||
GnipUsage = require('./usage'), | |||
GnipSearch = require('./search'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like you've documented GnipUsage in the Readme but not GnipSearch?
Hey @dirkbonhomme, I've made the changes you've requested. |
Thanks @JamesFrost! I've released your changes as v1.1.0 |
Very simple api wrapper for the Usage API.
Handles auth + rate limiting.