@getg5/g5-updatable
v2.6.1
Published
Allows Express apps to have G5updatable endpoints
Downloads
59
Readme
G5 Updatable JS
G5 Updatable provides a solution for automatic updates of client and location data when modified or created in the G5 Hub.
Requirements
G5 Updatable JS makes use of PostgreSQL's JSONB
field type, and so only supports
apps that also use PostgreSQL.
G5 Updatable JS makses use of Express and Sequelize so it only supports Express and Sequelize nodejs Apps
Usage
G5 Updatable JS exposes a POST route at /g5_updatable/update
that accepts a
client_uid
parameter (the URL for the client's detail page within the G5
Hub). When the route is hit, it will update/create Location and Client.
See the G5-Hub webhook logic for further info.
G5 Updatable also exposes two GET endpoints which return JSON:
/g5_updatable/locations/:urn
returns information about a location/g5_updatable/syncs
returns updated_at timetamp of the most recent location sync