package-control
A client for working with
package-control
in Node.
Installation
$ npm install package-control
Usage
const PackageControl = const pc = ;async { const packages = await pc console}
API
Response
Every available method on the PackageControl
object returns an Array
of Package
objects.
A Package
has the following format:
type Package = name: string description: string authors: Array<string> labels: Array<string> unique_installs: number st_versions: Array<number> installs_rank: number trending_rank: ?number first_seen: string last_seen: string last_modified: string is_missing: boolean platforms: Array<'windows' | 'osx' | 'linux'> missing_error?: string highlighted_name?: string highlighted_authors?: Array<string> z_value?: ?number}
An example:
pc.search(query[, opts])
Use a query to search for packages.
param | required | type | description | example |
---|---|---|---|---|
query | yes | string | The query you want to search for. | pc.search('react') |
opts.labels | no | string | Array | Filter package results by label. | pc.search('material', { labels: ['color scheme', 'theme']}) |
opts.limit | no | number | Limit size of package results. | pc.search('material', { limit: 15 }) |
pc.getThemes([limit])
Get a list of all Package Control themes.
param | required | type | description | example |
---|---|---|---|---|
limit | no | number | Limit size of theme results. | pc.getThemes(10) |
pc.getColorSchemes([limit])
Get a list of all Package Control color schemes.
param | required | type | description | example |
---|---|---|---|---|
limit | no | number | Limit size of color scheme results. | pc.getColorSchemes(10) |
pc.getLanguages([limit])
Get a list of all Package Control syntax languages.
param | required | type | description | example |
---|---|---|---|---|
limit | no | number | Limit size of language results. | pc.getLanguages(10) |