0.1.3 • Published 9 years ago

got-github-releases v0.1.3

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

got-github-releases Build Status

Got releases of github as accessible data

Install

$ npm install --save got-github-releases

Usage

var ghReleases = require('got-github-releases');

ghReleases('users/repo').then(function (releases) {
	console.log(releases.latest.tarball_url);
	//=> https://api.github.com/repos/users/repo/tarball/v0.0.1

	console.log(releases[releases.sortedIndex[0].tarball_url);
	//=> https://api.github.com/repos/users/repo/tarball/v0.0.1

	console.log(releases['v0.0.1'].tarball_url);
	//=> https://api.github.com/repos/users/repo/tarball/v0.0.1
}));

API

ghReleases(ownerAndRepo, options)

ownerAndRepo

Type: string

In part of address of repo, using owner and repo name, which is you want to know a list of releases.

options

version

Type: string

semver, you can also use with comparators. will get all of releases if it is not set.

sort

Type: boolean

Returns index sorted in descent by tag version name on releases

License

MIT © Jimmy Moon