packagecloud.js
JavaScript library for communicating with the packagecloud.io API.
Implemented API Endpoints
- Create Repository
- Delete Package
- Get Distributions
- Get Repositories
- Get Repository
- List Debian and RPM Packages
- List RubyGem, Python, and Java Packages
- Upload Package
- Promote Package
Installation
npm install packagecloud
or
yarn add packagecloud
Creating a Client
In the browser:
// i.e., Rails with a sprockets manifest//= require packagecloud/dist/packagecloud.browser.js...// main.jsvar pc = token:'your_api_token' baseUrl:'https://packagecloud.io';
Or in a NodeJS environment:
;const pc = token:'your_api_token' baseUrl:'https://packagecloud.io';
Result objects
Every client API method call returns a Promise
object, which is "thenable".
For example, the following code will fetch a list of distributions and return a
promise object that allows us to define what happens on success, or failure.
var { console;}var { console;}pc
Copyright
Copyright (c) 2018 Computology, LLC
See LICENSE file for details.