当前位置: 首页>>代码示例>>PHP>>正文


PHP Requests::getMyRequests方法代码示例

本文整理汇总了PHP中Requests::getMyRequests方法的典型用法代码示例。如果您正苦于以下问题:PHP Requests::getMyRequests方法的具体用法?PHP Requests::getMyRequests怎么用?PHP Requests::getMyRequests使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Requests的用法示例。


在下文中一共展示了Requests::getMyRequests方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: validateRoute

 case validateRoute('GET', 'requests'):
     $requests = new Requests($db, $user);
     list($requests, $total) = $requests->query((int) $_GET["index"], (int) $_GET["limit"], $_GET["sort"], $_GET["order"], $_GET["searchParams"]);
     httpResponse($requests, $total);
     break;
 case validateRoute('GET', 'requests/\\d+'):
     $requests = new Requests($db, $user);
     $movieData = new MovieData($db);
     $requestResponse = $requests->get($params[1]);
     $requestVotes = $requests->getVotes($params[1]);
     $movieDataResponse = $movieData->getData($requestResponse["imdbid"]);
     httpResponse(array("request" => $requestResponse, "votes" => $requestVotes, "movieData" => $movieDataResponse));
     break;
 case validateRoute('GET', 'requests/my'):
     $requests = new Requests($db, $user);
     httpResponse($requests->getMyRequests());
     break;
 case validateRoute('POST', 'requests'):
     $logs = new Logs($db, $user);
     $requests = new Requests($db, $user, $logs);
     httpResponse($requests->createOrUpdate($postdata));
     break;
 case validateRoute('PATCH', 'requests/\\d+'):
     $requests = new Requests($db, $user);
     httpResponse($requests->createOrUpdate($postdata, (int) $params[1]));
     break;
 case validateRoute('DELETE', 'requests/\\d+'):
     $logs = new Logs($db, $user);
     $mailbox = new Mailbox($db, $user);
     $requests = new Requests($db, $user, $logs, $mailbox);
     httpResponse($requests->delete($params[1], $_GET["reason"]));
开发者ID:lordgabber,项目名称:rartracker,代码行数:31,代码来源:api-v1.php


注:本文中的Requests::getMyRequests方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。