Package Exports
- is-gist-starred
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (is-gist-starred) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
is-gist-starred
Check if you have starred a given gist or not
const isGistStared = require('is-gist-starred');
// https://gist.github.com/domenic/2790533
isGistStared('2790533', {token: 'xxxx'}).then(starred => {
starred; //=> true
});
Installation
npm install is-gist-starred
API
const isGistStarred = require('is-gist-starred');
isGistStarred(gistId [, options])
gistId: String
(a gist ID, for example https://gist.github.com/tim/34309 → '34309'
)
options: Object
(gh-get
options)
Return: Promise
instance
It creates an API request to check if the gist is starred by the authentificated user, and returns a promise.
When it gets the result successfully, the promise will be fulfilled with a Boolean
value that shows whether the gist is starred or not.
When the request fails or the gist is not found, the promise will be rejected with an error.
License
Copyright (c) 2015 Shinnosuke Watanabe
Licensed under the MIT License.