-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Milestone
Description
Rest API
Provide a REST interface for the IONIC app.
IONIC app <---> rest-middleman <---> {website, MacOS, rest-middleman}
Sourcecode: https://github.com/blob-stream/rest-server
Online demo: https://pguth.github.io/blob-stream
Object definitions
var blob1 = {
"blobID": "ofnlcsofagunpoavtrcnw",
"heading": "Grass is always greener on the other side.",
"description": "This is a wonderful day =)",
"creator": "Dary",
"dataURL": "data:image/gif;base64,..." // <-- das eigentliche bild
}var event1 = {
"verb": "newBlob",
"blobID": "ofnlcsofagunpoavtrcnw"
}var event2 = {
"verb": "addVote", // auch noch "removeVote"
"voter": "Dary",
"blobID": "ofnlcsofagunpoavtrcnw"
}REST endpoints
- Get recent events:
GET/events/recent/NUMBER
-> Results in zB:[ event1, event2, ... ] - Get a blob:
GET/blob/get/blobID
-> Results in zB:blob1 - Add a blob:
POST/blob/create
-> Per POST das blob-Objekt an den Server schicken. - Add a vote:
POST/blob/vote
-> Per POST das vote-Objekt (zB.event2) an server schicken.
Functionality
-
rest-middleman <---> {website, MacOS, rest-middleman}