0.0.1 • Published 7 years ago

issue-tracker-sdk-js v0.0.1

Weekly downloads
12
License
MIT
Repository
github
Last release
7 years ago

Issue Tracker Node SDK

A simple SDK to track error in JS projects. Both Backend and Frontend.

How to use

npm install --save issue-tracker-js-sdk

Using require:

const Issue = require('issue-tracker-js-sdk').default

const body = {
	title: 'Issue created using the API', //The title of issue
	body: 'Hello I am an Issue!!', // The body of issue
	assignees: ['cezarpretto', 'eduwl'], //The users that the issue will be assigned to
	projectName: 'ncmhelper-node-api' // The project name from the issue is being triggered
}

Issue.setToken('Bearer: yourValidAPIToken')
Issue.create(body).then(data => {
  console.log(data)
}).catch(err => {
  console.error(err)
})

Using import:

import Issue from 'issue-tracker-js-sdk'

const body = {
	title: 'Issue created using the API', //The title of issue
	body: 'Hello I am an Issue!!', // The body of issue
	assignees: ['cezarpretto', 'eduwl'], //The users that the issue will be assigned to
	projectName: 'ncmhelper-node-api' // The project name from the issue is being triggered
}

Issue.setToken('Bearer: yourValidAPIToken')
Issue.create(body).then(data => {
  console.log(data)
}).catch(err => {
  console.error(err)
})