{"id":17472729,"url":"https://github.com/shinnn/unstar-gist","last_synced_at":"2025-07-24T01:04:38.545Z","repository":{"id":57386888,"uuid":"48781728","full_name":"shinnn/unstar-gist","owner":"shinnn","description":"Unstar a gist","archived":false,"fork":false,"pushed_at":"2016-09-02T11:27:52.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-11T01:39:44.771Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shinnn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-12-30T04:26:19.000Z","updated_at":"2016-03-03T08:29:31.000Z","dependencies_parsed_at":"2022-09-26T16:50:45.113Z","dependency_job_id":null,"html_url":"https://github.com/shinnn/unstar-gist","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/shinnn/unstar-gist","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Funstar-gist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Funstar-gist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Funstar-gist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Funstar-gist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shinnn","download_url":"https://codeload.github.com/shinnn/unstar-gist/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Funstar-gist/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266775366,"owners_count":23982273,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-18T17:34:56.113Z","updated_at":"2025-07-24T01:04:38.523Z","avatar_url":"https://github.com/shinnn.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# unstar-gist\n\n[![NPM version](https://img.shields.io/npm/v/unstar-gist.svg)](https://www.npmjs.com/package/unstar-gist)\n[![Build Status](https://travis-ci.org/shinnn/unstar-gist.svg?branch=master)](https://travis-ci.org/shinnn/unstar-gist)\n[![Coverage Status](https://img.shields.io/coveralls/shinnn/unstar-gist.svg)](https://coveralls.io/github/shinnn/unstar-gist)\n[![dependencies Status](https://david-dm.org/shinnn/unstar-gist/status.svg)](https://david-dm.org/shinnn/unstar-gist)\n[![devDependencies Status](https://david-dm.org/shinnn/unstar-gist/dev-status.svg)](https://david-dm.org/shinnn/unstar-gist?type=dev)\n\nUnstar a [gist](https://gist.github.com/)\n\n```javascript\nconst unstarGist = require('unstar-gist');\n\nunstarGist('2790533', {token: 'xxxx'}).then(response =\u003e {\n  response.statusCode; //=\u003e 204\n  console.log('Unstarred a gist: https://gist.github.com/2790533');\n});\n```\n\n## Installation\n\n[Use npm.](https://docs.npmjs.com/cli/install)\n\n```\nnpm install unstar-gist\n```\n\n## API\n\n```javascript\nconst unstarGist = require('unstar-gist');\n```\n\n### unstarGist(*gistId* [, *options*])\n\n*gistId*: `String` (a [gist](https://help.github.com/articles/about-gists/) ID, for example [https://gist.github.com/tim/34309](https://gist.github.com/tim/34309) → `'34309'`)  \n*options*: `Object` ([`gh-get` options](https://github.com/shinnn/gh-get#options))  \nReturn: [`Promise`](http://www.ecma-international.org/ecma-262/6.0/#sec-promise-constructor) instance\n\nIt makes an [API](https://developer.github.com/v3/) request to [unstar a gist by the authenticated user](https://developer.github.com/v3/gists/#unstar-a-gist), and returns a promise.\n\nThe promise will be [*fulfilled*](https://promisesaplus.com/#point-26) with an [`http.IncomingMessage`](https://nodejs.org/api/http.html#http_http_incomingmessage) object if successful, otherwise [*rejected*](https://promisesaplus.com/#point-30) with an error.\n\n```javascript\nunstarGist('ab12852099', {token: 'xxxxxx'}).catch(err =\u003e {\n  err.message;\n  //=\u003e '404 Not Found (Gist not found: https://gist.github.com/ab12852099)'\n});\n\nunstarGist('2790533', {token: 'invalid_token'}).catch(err =\u003e {\n  err.message;\n  //=\u003e '401 Unauthorized (Bad credentials)'\n});\n```\n\n## Related Projects\n\n* [is-gist-starred](https://github.com/shinnn/is-gist-starred) (Check if you have starred a given gist or not) \n* [star-gist](https://github.com/shinnn/star-gist) (Star a gist)\n\n## License\n\nCopyright (c) 2015 - 2016 [Shinnosuke Watanabe](https://github.com/shinnn)\n\nLicensed under [the MIT License](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshinnn%2Funstar-gist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshinnn%2Funstar-gist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshinnn%2Funstar-gist/lists"}