Commit 5a1135aa authored by Mindiell's avatar Mindiell

Cleaning of fake REST API

parent c4a724f9
......@@ -21,56 +21,6 @@ class RestApi {
echo $this->return_datas('app/datas/contacts.json');
}
function contact($f3,$args) {
if ($f3->exists('PARAMS.contact')) {
// Specified contact
} else {
// Random contact
echo '{
"id": "4123",
"last_name": "ANDERSDOTTER",
"first_name": "Amelia",
"tel": "+322 28 45922",
"groups": [
{
"type": "Political group",
"name": "Greens/EFA",
"media": ""
},
{
"type": "National party",
"name": "Piratpartiet",
"media": ""
},
{
"type": "Country",
"name": "SE",
"media": ""
},
{
"type": "Committee",
"name": "ITRE",
"media": ""
},
{
"type": "Committee",
"name": "INTA",
"media": ""
},
{
"type": "Committee",
"name": "CONT",
"media": ""
}
]
}';
}
}
function groups($f3,$args) {
// List of groups available
}
function categories($f3,$args) {
// List of feedback categories
echo'{"categories": [
......
......@@ -8,12 +8,9 @@ POST @feedbacksip:/feedbacksip=Main->feedbacksip
GET @salespitch:/salespitch=Main->salespitch
; Fake REST API
GET /restapi/campaign/@id=RestApi->campaign
GET /restapi/campaign/@id/contacts=RestApi->contacts
GET /restapi/campaign/@id/contact=RestApi->contact
GET /restapi/campaign/@id/contact/@contact=RestApi->contact
GET /restapi/campaign/@id/groups=RestApi->groups
GET /restapi/campaign/@id/feedback/categories=RestApi->categories
POST /restapi/campaign/@id/feedback/add=RestApi->feedback_add
GET /restapi/campaign/@id/arguments/@lang=RestApi->arguments
GET /restapi/campaigns/@id=RestApi->campaign
GET /restapi/campaigns/@id/contacts=RestApi->contacts
GET /restapi/campaigns/@id/feedback/categories=RestApi->categories
POST /restapi/campaigns/@id/feedback/add=RestApi->feedback_add
GET /restapi/campaigns/@id/arguments/@lang=RestApi->arguments
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment