Client
Client for the Sentry API.
Table of Contents
Constructor
Client
-
dsn -
config
Parameters:
-
dsnStringSentry DSN.
-
configOptionsConfig
-
versionNumberSentry 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:
-
pathStringRequest path.
-
callbackFunctionRequest callback.
Returns:
get
-
path -
params -
callback
Convenience method for making GET requests.
Parameters:
-
pathStringRequest path.
-
paramsObjectRequest query string parameters.
-
callbackFunctionRequest callback.
Returns:
post
-
path -
body -
callback
Convenience method for making POST requests.
Parameters:
-
pathStringRequest path.
-
bodyObjectRequest body.
-
callbackFunctionRequest callback.
Returns:
put
-
path -
body -
callback
Convenience method for making PUT requests.
Parameters:
-
pathStringRequest path.
-
bodyObjectRequest body.
-
callbackFunctionRequest callback.
Returns:
request
-
path -
options -
callback
Make a request to the Sentry API.
Parameters:
-
pathStringThe request path.
-
optionsObjectRequest options. These are the same as the request module's options.
-
callbackFunctionFunction to execute when the request completes.