1.0.0 • Published 6 years ago

whubarprint-appapi v1.0.0

Weekly downloads
1
License
ISC
Repository
-
Last release
6 years ago

Whubarprint-appapi

This documents aims to explain Innovation.rocks's AR-Backend whubarprint-appapi.

Development

Dependencies:

  • node.js >= 8 , best installed via nvm 1
  • A Redis-Store 2

Setup

npm install -g @inr/whubarprint-appapi

Configure

There are following environment variables to configure whubarprint-appapi:

APPAPI_PORT : The port where whubarprint should listen to for incomming http requests. APPAPI_API_VERSION: The version of the API(Default:2). APPAPI_REDIS_URL: The url to redis Store.

Examples

APPAPI_PORT=1337 APPAPI_REDIS_URL=redis://127.0.0.1:6379 APPAPI_API_VERSION=2 whubarprint-appapi

How it works

There are 5 Endpoints:

NameEndpointredis-key
inital/initalWhubArPrint:apiVersion:App:apikey:initial
wonderpage/wonderpages/:targetIdWhubArPrint:apiVersion:App:apikey:trigger:image:targetId
testwonderpage/testwonderpages/:targetIdWhubArPrint:apiVersion:App:apikey:trigger:image:targetId:Test
package/packages/:majorVersionWhubArPrint:apiVersion:Package:1
status/statusjust checking the connection to redis

Each Endpoint is just checking and returning the content of a specific redis key. Each request needs the following heder for authorization: Authorization:API-Key [apiKey] [apiKey] is the apiKey of the app.

API-Docs

This project uses postman3 collection for api documentation. The collection and the local and production environment files are in /docs collection and environment files

Contribution

Contribution guidelines for this project

References

1.0.0

6 years ago