postgres-api
v0.1.4
Published
Postgres API methods
Downloads
7
Readme
Functions
Typedefs
createService(obj) ⇒ Promise
Kind: global function
Returns: Promise - resolved promise with saved object
| Param | Type | | --- | --- | | obj | Service |
deletePostgresApp(id) ⇒ Promise
Deletes a service in postgres by service id
Kind: global function
Returns: Promise - Resolved promise on success containing JSON formatted response
Throws:
- exception
| Param | Type | Description | | --- | --- | --- | | id | string | Service id to delete |
updatePostgresApp(id, obj) ⇒ Promise
Updates service properties in postgres keyed by service id
Kind: global function
Returns: Promise - Resolved promise on success containing JSON formatted response containing the new Service object
Throws:
- exception
| Param | Type | Description | | --- | --- | --- | | id | string | Service id to delete | | obj | Object | the property or properties of the Service object to update. Note that the name property and id properties cannot be updated |
getService(id) ⇒ Promise.<Service>
Returns a Service object in postgres keyed by service id
Kind: global function
Returns: Promise.<Service> - Resolved promise on success containing JSON formatted response containing the Service object
Throws:
- exception
| Param | Type | Description | | --- | --- | --- | | id | string | Service id |
getServiceByName(name) ⇒ Promise.<Service>
Returns a Service object in postgres keyed by service name
Kind: global function
Returns: Promise.<Service> - Resolved promise on success containing JSON formatted response containing the Service object
Throws:
- exception
| Param | Type | Description | | --- | --- | --- | | name | string | string to query |
getAllPermissions() ⇒ Promise.<Permission>
Returns an array of permission ids
Kind: global function
Returns: Promise.<Permission> - Resolved promise on success containing JSON formatted list of permissions
Throws:
- exception
Permission : Object
Kind: global typedef
Properties
| Name | Type | Description | | --- | --- | --- | | id | string | required - unique id of the permission | | name | string | required - Name of permission | | description | string | required - Description of the permission |
Service : Object
Kind: global typedef
Properties
| Name | Type | Default | Description | | --- | --- | --- | --- | | id | string | | required - unique id of the service | | name | string | | required - Name of service | | description | string | | required - Description of the service | | callbackUrl | string | | required - Base callback path | | websiteUrl | string | | required - Link to developer's website | | [enabled] | Boolean | "true" | optional - indicates whether service is enabled or not (enabled meaning active) | | [termsLink] | string | null | null | optional - link to developer terms and conditions |