0.0.0 • Published 9 years ago
gh-content v0.0.0
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-deleteAPI
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 - 2016 Shinnosuke Watanabe
Licensed under the MIT License.
0.0.0
9 years ago