@spongex/check-github-releases
v1.1.0
Published
Check a GitHub Releases via the API and parse download links
Downloads
2
Readme
check-github-releases
Check a GitHub Releases via the API and parse download links
Install to your existing project using:
npm i @spongex/check-github-releases
Include ECMAScript:
import { checkGitHubReleases } from '@spongex/check-github-releases'
Include CommonJS:
const { checkGitHubReleases } = require('@spongex/check-github-releases')
Usage
checkGitHubReleases: async (
GitHubURL: string,
opts?:[ { group:Extensions, extensions:Array } ]
) => Promise
Takes the following parameters:
__GitHubURL__
A string of the GitHub Releases API URLopts
Optional parameter to add additional extension groups to check. This is an array that takes an object in the following format:group
The asset group to add to. Valid options are: Extensions.winExt, Extensions.macExt, Extensions.linExtextensions
An array of strings containing the extensions to add to the parser
Returns an object in the following format:
winURLs
An array ofURLAsset
of parsed Windows assetsmacURLs
An array ofURLAsset
of parsed Mac assetslinURLs
An array ofURLAsset
of parsed Linux assetssourceURLs
An array ofURLAsset
of parsed source code assetsmessage
Error code message if anyerror
Error flag, true if error else false
The URLAsset
is an object with the following format:
name
A string with the filenameurl
A string with the URL to download the asset
Changelog
1.1.0
- Added the following extentions to Mac:
pkg
,mas
,mas-dev
- Added the following extentions to Linux:
freebsd
,p5p
,apk
1.0.0
- Initial release