예제 #1
0
파일: api.php 프로젝트: JaimeA/SkunkWrx
 case "check_push_notifications":
     if (isset($_REQUEST["message_feed_id"])) {
         $value = $api->refresh_message_feeds($_REQUEST["message_feed_id"]);
         exit(json_encode($value));
     } else {
         $value = array("Response" => array("status" => 401, "message" => "Missing argument"));
         exit(json_encode($value));
     }
     break;
 case "get_badges":
     $value = $api->get_badges();
     exit(json_encode($value));
     break;
 case "register":
     if (isset($_REQUEST["audience_email"]) && isset($_REQUEST["audience_email_confirm"]) && isset($_REQUEST["password"]) && isset($_REQUEST["password_confirm"]) && isset($_REQUEST["project_id"])) {
         $value = $api->register($_REQUEST["audience_email"], $_REQUEST["audience_email_confirm"], $_REQUEST["password"], $_REQUEST["password_confirm"], $_REQUEST["project_id"]);
         exit(json_encode($value));
     } else {
         $value = "Missing argument";
     }
     break;
 case "login":
     if (isset($_REQUEST["audience_email"]) && isset($_REQUEST["password"]) && isset($_REQUEST["project_id"])) {
         $value = $api->login(strtolower($_REQUEST["audience_email"]), $_REQUEST["password"], $_REQUEST["project_id"]);
         exit(json_encode($value));
     } else {
         $value = "Missing argument";
     }
     break;
 case "reset":
     if (isset($_REQUEST["audience_email"]) && isset($_REQUEST["project_id"])) {