Ionic Pro API Client
A simple JavaScript client for interacting with the Ionic Pro API.
Note: this is meant for API access, not end-user apps. For most users, the Pro Client is actually what you want.
Alpha Notice
This is still in active development, and is far from comprehensive at the moment.
Available API Resources
Installation
npm install --save @ionic/pro-api-javascript-client
Usage
import { Environment, ProClient, User } from 'pro-client';
...
let cfg: Environment = { debug: true }
let client: ProClient = new ProClient(cfg);
...
client.login("username@test.com", "myAwesomePassword123").then((user: User) => {
console.log("Logged in", user);
});
...
client.resource.apps.list().then((res: any) => {
console.log("My apps:", res);
}, (err: any) => {
console.error("Error getting apps:", err);
});
...
let appId: string = "abcd1234";
let filters = { platform: "iOS" };
client.resource.package.list(appId, filters).then((res: any) => {
console.log("My native builds:", res);
}, (err: any) => {
console.error("Error getting builds:", err);
});