gh-delete
v1.0.0
Published
Create a DELETE request to the Github API
Downloads
3
Maintainers
Readme
gh-delete
A Node module to create a DELETE
request to the Github API
const ghDelete = require('gh-delete');
ghDelete('gists/6ba9f11f4e1acf136450', {
headers: {
'user-agent': 'your application name'
},
token: 'your access token'
}).then(response => {
response.headers.status; //=> '204 No Content'
console.log('Successfully deleted https://gist.github.com/shinnn/6ba9f11f4e1acf136450');
});
Installation
npm install gh-delete
API
const ghDelete = require('gh-delete');
ghDelete(url [, options])
url: String
("path" part of a Github API URL)
options: Object
(gh-get
options)
Return: Object
(Promise
instance)
Almost the same as gh-get, except that the method
option defaults to 'DELETE'
and unchangable.
License
Copyright (c) 2015 Shinnosuke Watanabe
Licensed under the MIT License.