本文整理汇总了PHP中Piwik\Plugins\API\API::getBulkRequest方法的典型用法代码示例。如果您正苦于以下问题:PHP API::getBulkRequest方法的具体用法?PHP API::getBulkRequest怎么用?PHP API::getBulkRequest使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Piwik\Plugins\API\API
的用法示例。
在下文中一共展示了API::getBulkRequest方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: test_getBulkRequest_IsAbleToHandleManyDifferentRequests
public function test_getBulkRequest_IsAbleToHandleManyDifferentRequests()
{
$token = Fixture::getTokenAuth();
$urls = array("method%3dVisitsSummary.get%26idSite%3d1%26date%3d2015-01-26%26period%3dday", "method%3dVisitsSummary.get%26token_auth%3d{$token}%26idSite%3d1%26date%3d2015-01-26%26period%3dday", "method%3dVisitsSummary.get%26idSite%3d1%26date%3d2015-01-26%26period%3dday", "method%3dVisitsSummary.get%26idSite%3d1%26token_auth%3danonymous%26date%3d2015-01-26%26period%3dday");
$response = $this->api->getBulkRequest($urls);
$this->assertResponseIsPermissionError($response[0]);
$this->assertResponseIsSuccess($response[1]);
$this->assertSame(0, $response[1]['nb_visits']);
$this->assertResponseIsPermissionError($response[2]);
$this->assertResponseIsPermissionError($response[3]);
}