0.1.4 • Published 5 years ago

postgres-api v0.1.4

Weekly downloads
1
License
UNLICENSED
Repository
github
Last release
5 years ago

Functions

Typedefs

createService(obj) ⇒ Promise

Kind: global function
Returns: Promise - resolved promise with saved object

ParamType
objService

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
ParamTypeDescription
idstringService 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
ParamTypeDescription
idstringService id to delete
objObjectthe 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
ParamTypeDescription
idstringService 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
ParamTypeDescription
namestringstring 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

NameTypeDescription
idstringrequired - unique id of the permission
namestringrequired - Name of permission
descriptionstringrequired - Description of the permission

Service : Object

Kind: global typedef
Properties

NameTypeDefaultDescription
idstringrequired - unique id of the service
namestringrequired - Name of service
descriptionstringrequired - Description of the service
callbackUrlstringrequired - Base callback path
websiteUrlstringrequired - Link to developer's website
enabledBoolean"true"optional - indicates whether service is enabled or not (enabled meaning active)
termsLinkstring | nullnulloptional - link to developer terms and conditions