Exemple #1
0
         $value = $api->oauth_call($_REQUEST["method"], $_REQUEST["matchphrase"], $_REQUEST["audience_phone"]);
     } else {
         $value = array("Response" => "Error");
     }
     exit(json_encode($value));
     break;
 case "send_answer":
     if (isset($_REQUEST["matchphrase"]) && isset($_REQUEST["character"]) && isset($_REQUEST["type"]) && isset($_REQUEST["index"])) {
         $value = $api->send_answer($_REQUEST["matchphrase"], $_REQUEST["character"], $_REQUEST["type"], $_REQUEST["index"]);
     } else {
         $value = array("Response" => "Error");
     }
     exit(json_encode($value));
     break;
 case "get_stats":
     $value = $api->get_stats();
     exit(json_encode($value));
     break;
 case "get_delay":
     $value = $api->get_delay();
     exit($value);
     break;
 case "set_delay":
     if (isset($_REQUEST["delay"]) && isset($_REQUEST["project_id"])) {
         $value = $api->set_delay($_REQUEST["delay"], $_REQUEST["project_id"]);
     } else {
         $value = array("Response" => "Error", "message" => "Invalid arguments");
     }
     exit(json_encode($value));
     break;
 case "update_profile":