toggle-gist-star
Unstar the gist if you've already starred it, otherwise star it
const toggleGistStar = ; token = 'xxx'; // your Github API access token ;
Installation
npm install toggle-gist-star
API
const toggleGistStar = ;
toggleGistStar(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 checks if a gist with the given ID is starred or not, then unstars it if it's already starred by the authenticated user, otherwise stars it.
The promise will be fulfilled with an http.IncomingMessage
object if successful, otherwise rejected with an error.
; ;
License
Copyright (c) 2016 Shinnosuke Watanabe
Licensed under the MIT License.