Esempio n. 1
0
    $result = $db->getTeamNextSoccerMatch($teamID);
    $nextSoccermatch = $result->fetch_assoc();
    $response["Error"] = false;
    $response["SoccerMatch"] = $nextSoccermatch;
    echoRespnse(200, $response);
});
/**
 * Gets the last soccer match result of aparticular team
 * method GET
 * url /teams/:teamID/last-result'
 */
$app->get('/teams/:teamID/last-result', function ($teamID) use($app) {
    $req = $app->request();
    $response = array();
    $db = new DbHandler();
    $result = $db->getTeamLastResult($teamID);
    $lastResult = $result->fetch_assoc();
    $response["Error"] = false;
    $response["SoccerMatch"] = $lastResult;
    echoRespnse(200, $response);
});
//  ==============================
//  ======== MASTER DATA =========
//  ==============================
/**
 * Listing all possible events in a soccer match
 * method GET
 * url /seasons/:id/competitions
 */
$app->get('/events', function () {
    global $user_id;