Client
Client for the Sentry API.
Table of Contents
Constructor
Client
-
dsn
-
config
Parameters:
-
dsn
StringSentry DSN.
-
config
OptionsConfig
-
version
NumberSentry API version number.
-
Example:
var Client = require('sentry-api').Client;
var sentry = new Client('https://abc123:@app.getsentry.com/1234', { logging: true });
sentry.projects.get('my-organization-slug', 'my-project-slug').then(function(error, project) { console.log(project.name); });
Methods
delete
-
path
-
callback
Convenience method for making DELETE requests.
Parameters:
-
path
StringRequest path.
-
callback
FunctionRequest callback.
Returns:
get
-
path
-
params
-
callback
Convenience method for making GET requests.
Parameters:
-
path
StringRequest path.
-
params
ObjectRequest query string parameters.
-
callback
FunctionRequest callback.
Returns:
post
-
path
-
body
-
callback
Convenience method for making POST requests.
Parameters:
-
path
StringRequest path.
-
body
ObjectRequest body.
-
callback
FunctionRequest callback.
Returns:
put
-
path
-
body
-
callback
Convenience method for making PUT requests.
Parameters:
-
path
StringRequest path.
-
body
ObjectRequest body.
-
callback
FunctionRequest callback.
Returns:
request
-
path
-
options
-
callback
Make a request to the Sentry API.
Parameters:
-
path
StringThe request path.
-
options
ObjectRequest options. These are the same as the request module's options.
-
callback
FunctionFunction to execute when the request completes.