-
Notifications
You must be signed in to change notification settings - Fork 0
/
api.php
36 lines (28 loc) · 798 Bytes
/
api.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
/***********************************************
"api.php"
Created by Michael Cheng on 12/28/2015 11:51
http://michaelcheng.us/
michael@michaelcheng.us
--All Rights Reserved--
***********************************************/
require_once("../functions.php");
FreePeeAPI::request($_GET['request']);
$method = $_SERVER['REQUEST_METHOD'];
switch(FreePeeAPI::getEndpoint()) {
case Constants::ENDPOINT_BATHROOM:
FreePeeAPI::handleBathroomEndpoint($method);
break;
case Constants::ENDPOINT_GEOCODE:
FreePeeAPI::handleGeocodeEndpoint($method);
break;
case Constants::ENDPOINT_LOGIN:
FreePeeAPI::handleLoginEndpoint($method);
break;
case Constants::ENDPOINT_STATUS:
FreePeeAPI::handleStatusEndpoint();
break;
default:
break;
}
?>