-
-
Notifications
You must be signed in to change notification settings - Fork 418
API Reference
-
AppManager ⇐
AbstractService
-
Use YAPS AppMAnager, a capability of YAPS Systems Manager, to create, manage, and deploy an application. The AppManager requires of a running YAPS platform.
-
App :
Object
-
Application object
-
Options :
Object
-
Use the Options object to overwrite the service default configuration.
Use YAPS AppMAnager, a capability of YAPS Systems Manager, to create, manage, and deploy an application. The AppManager requires of a running YAPS platform.
Kind: global class
Extends: AbstractService
-
AppManager ⇐
AbstractService
Constructs a service object.
Param | Type | Description |
---|---|---|
options | Options |
Overwrite for the service's defaults configuration. |
Example
const YAPS = require('@yaps/sdk')
const appmanager = new YAPS.AppManager()
appmanager.listApps()
.then(result => {
console.log(result) // successful response
}).catch(e => console.error(e)) // an error occurred
appmanager.getApp(name) ⇒ Promise.<App>
Retrives a single application by its reference.
Kind: instance method of AppManager
Returns: Promise.<App>
- app - The application
Param | Type | Description |
---|---|---|
name | string |
The app identifier |
Example
appmanager.getApp(name)
.then(result => {
console.log(result) // returns the app object
}).catch(e => console.error(e)) // an error occurred
appmanager.createApp(request) ⇒ Promise.<App>
Creates a new application.
Kind: instance method of AppManager
Returns: Promise.<App>
- - The application just created.
Todo
- if the file uploading fails the state of the application should change to UNKNOWN
Param | Type | Description |
---|---|---|
request | Object |
Request for object creation. |
Example
const request = {
dirPath: '/path/to/project',
app: {
name: 'hello-world',
description: 'Simple Voice App'
}
}
appmanager.createApp(request)
.then(result => {
console.log(result) // returns the app object
}).catch(e => console.error(e)) // an error occurred
Application object
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
status | App.Status |
Current status of the application. |
name | string |
A name, globally unique, for the application. |
description | string |
A description for the application. |
createTime | number |
Time the application was created. |
updateTime | number |
Last time the application was updated. |
labels | map |
Metadata for this application. |
Use the Options object to overwrite the service default configuration.
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
endpoint | string |
The endpoint URI to send requests to. The endpoint should be a string like '{serviceHost}:{servicePort}'. |
accessKeyId | string |
your YAPS access key ID. |
accessKeySecret | string |
your YAPS secret access key. |
bucket | string |
The bucket to upload apps and media files. |
Copyright (C) 2022 by Fonoster Inc