コード例 #1
0
ファイル: api.php プロジェクト: JaimeA/SkunkWrx
        $data = $st->fetchAll(PDO::FETCH_ASSOC);
        return $data[0];
    }
}
$api = new Conducttr_API();
$possible_method = array("GET", "POST", "PUT", "DELETE");
$value = "An error has occurred";
if (isset($_REQUEST["action"])) {
    $action = strtolower($_REQUEST["action"]);
    switch ($action) {
        case "get_user_info":
            $value = $api->get_user_info();
            break;
        case "get_nextvideo":
            if (isset($_REQUEST["audience_phone"])) {
                $value = $api->get_NextVideo($_REQUEST["audience_phone"]);
            } else {
                $value = "Missing argument";
            }
            break;
        case "reset_nextvideo":
            if (isset($_REQUEST["audience_phone"])) {
                $value = $api->reset_NextVideo($_REQUEST["audience_phone"]);
            } else {
                $value = "Missing argument";
            }
            break;
        case "set_nextvideo":
            if (isset($_REQUEST["nextvideo"]) && isset($_REQUEST["audience_phone"])) {
                $value = $api->set_NextVideo($_REQUEST["nextvideo"], $_REQUEST["audience_phone"]);
            } else {