Server Backend for MachtSpass iOS App! Read more about the project here: [https://github.com/ffittschen/hackaTUM]
- Azure DocumentDB - MongoDB
- Azure API App ( NodeJS / Express )
- Azure Push Notification Hub -> integrated but replaced because we had some certificate issues -> replaced with https://github.com/node-apn/node-apn
- Mongoose -> use related database item with ref
- REST API Authentication ( API_KEY/ TOKEN )
- Azure Analitics Services
Node-APN - Copyright © 2010 Andrew Naylor ExpressJS - Copyright © 2016 StrongLoop, IBM, and other expressjs.com contributors. Node.js Copyright © 2016 Joyent.
[/api/v1/profiles]
[/api/v1/products]
[/api/v1/questions]
[/api/v1/answers]
[/api/v1/ratings?page=1&limit=10]
GET: /api/v1/fakedata
POST: /api/v1/profile
{
name: String,
avatar: String,
pushid: String,
notificationactive: Boolean
}
GET: /api/v1/profile:id
PUT: /api/v1/profile:id
{
name: String,
avatar: String,
pushid: String,
notificationactive: Boolean
}
POST: /api/v1/product
{
"productid":"",
"userid":"",
"pushid":"", // device token
}
return
{
userid: String,
product: {
productid: String,
title: String,
content: String,
features: String,
link: String,
image: String,
price: Number
},
rating: {
funfactor: Number,
likes: Number,
dislikes: Number
}
}
POST: /api/v1/question
{
"userid": "",
"productid": "",
"latitude": "",
"longitude": ""
}
return
{
"status": "OK",
"message": "",
"questionid": "",
"waitfor": "500"
}
GET: /api/v1/question/:id/status
return
{
"status": "OK",
"message": "",
"questionid": 0,
"likes": 10,
"dislikes": 2,
"funfactor": 10
}
GET: /api/v1/question:id
return
{
"questionid": "",
"product": {
productid: String,
title: String,
content: String,
features: String,
link: String,
image: String,
price: Number
},
}
POST: /api/v1/answer
{
"userid": "",
"productid": "",
"like": 1,
"dislike": 0
}
return
{
"status": "OK",
"message": "",
}