Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/insin/stargaze
Watch a GitHub repo's star count, with change notifications on your desktop
https://github.com/insin/stargaze
github nodejs stars tool
Last synced: about 1 month ago
JSON representation
Watch a GitHub repo's star count, with change notifications on your desktop
- Host: GitHub
- URL: https://github.com/insin/stargaze
- Owner: insin
- License: mit
- Created: 2015-04-10T09:19:36.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-04-10T11:16:36.000Z (almost 10 years ago)
- Last Synced: 2024-12-20T04:06:24.175Z (about 2 months ago)
- Topics: github, nodejs, stars, tool
- Language: JavaScript
- Homepage:
- Size: 121 KB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Stargaze
Watch a GitHub repo's star count, with change notifications on your desktop via
[node-notifier](https://github.com/mikaelbr/node-notifier).![Example Stargaze notification using a Windows taskbar balloon](https://github.com/insin/stargaze/raw/master/example.png)
### Command-Line Usage
Install globally for command-line usage:
```
npm install -g stargaze
```
```
$ stargaze -h
Usage: stargaze [options] github_repoOptions:
-d, --delay Delay between requests (s < 1000 or ms >= 1000) [default: 60]
-u, --user GitHub username
-p, --pass GitHub password
-q, --quiet Suppress all non-error output
-v, --verbose Verbose output (shows rate limit info)
-h, --help Show this helpUnauthenticated requests have a very low rate limit
```
```
$ stargaze -v facebook/react
[2015-04-10T10:29:37.249Z] Requesting stars for facebook/react
[2015-04-10T10:29:37.736Z] 20019
[2015-04-10T10:29:37.738Z] x-ratelimit-limit: 60
[2015-04-10T10:29:37.741Z] x-ratelimit-remaining: 54
[2015-04-10T10:29:37.744Z] x-ratelimit-reset: 1428664607
```### API Usage
Using the stargaze API allows you to pass a callback which gets called every
time the number of stars changes.```
npm install stargaze
```
```javascript
var stargaze = require('stargaze')stargaze('facebook/react', {verbose: true}, function(stars) {
if (stars % 1000 === 0) {
tweet('OMG Base 10! ' + stars)
}
})
```#### stargaze(repo[, options][, callback])
`repo` - a GitHub repo in `/` format.
`options` - an optional Object specifying additional options (see below)
`callback` - an optional callback function which will be called with the current
number of stars every time it changes.The callback will **not** be called for the initial request.
##### Options
`auth` - an Object with `user` and `pass` properties, specifying GitHub
credentials to authenticate requests.`timeout` - delay between requests to GitHub, in milliseconds; default: 60000.
`quiet` - if truthy, suppresses non-error console output.
`verbose` - if truthy, displays rate limit data in console output.
## MIT Licensed