sentry-got

1.0.0 • Public • Published

sentry-got

Convenience wrapper for Got to interact with the Sentry API

Install

npm i sentry-got

Usage

Instead of:

const got = require('got');
const token = 'foo';
 
(async () => {
    const {body} = await got('https://sentry.io/api/0/projects/{organization_slug}/{project_slug}/events/', {
        json: true,
        headers: {
      'authorization': `Bearer ${token}`,
        }
    });
 
    console.log(body);
    //=> '[]'
})();

You can do:

const sentryGot = require('sentry-got');
 
(async () => {
    const {body} = await sentryGot('projects/{organization_slug}/{project_slug}/events/', {token: 'foo'});
    console.log(body.events);
    //=> '[]'
})();

Readme

Keywords

Package Sidebar

Install

npm i sentry-got

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

2.66 kB

Total Files

4

Last publish

Collaborators

  • vitaliis