本文整理汇总了PHP中Channel::queryBindList方法的典型用法代码示例。如果您正苦于以下问题:PHP Channel::queryBindList方法的具体用法?PHP Channel::queryBindList怎么用?PHP Channel::queryBindList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Channel
的用法示例。
在下文中一共展示了Channel::queryBindList方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: queryBindList
/**
* 查询设备、应用、用户与百度Channel的绑定关系
* @param type $paramArr
*/
public static function queryBindList($paramArr)
{
$options = array('apiKey' => '', 'secretKey' => '', 'userId' => '', 'channelId' => '', 'deviceType' => '', 'star' => 0, 'limit' => 10);
if (is_array($paramArr)) {
$options = array_merge($options, $paramArr);
}
extract($options);
//用户标识 必填
if (!$userId) {
return false;
}
$channel = new Channel($apiKey, $secretKey);
//$optional 可选参数,支持的可选参数包括:
$optional = array();
if ($channelId) {
$optional[Channel::CHANNEL_ID] = $channelId;
}
if ($deviceType) {
$optional[Channel::DEVICE_TYPE] = $deviceType;
}
if ($star) {
$optional[Channel::START] = $star;
}
if ($limit) {
$optional[Channel::LIMIT] = $limit;
}
$ret = $channel->queryBindList($userId, $optional);
return $ret;
}
示例2: test_queryBindList
function test_queryBindList($userId)
{
global $apiKey;
global $secretKey;
$channel = new Channel($apiKey, $secretKey);
$optional[Channel::CHANNEL_ID] = "3915728604212165383";
$ret = $channel->queryBindList($userId, $optional);
if (false === $ret) {
error_output('WRONG, ' . __FUNCTION__ . ' ERROR!!!!!');
error_output('ERROR NUMBER: ' . $channel->errno());
error_output('ERROR MESSAGE: ' . $channel->errmsg());
error_output('REQUEST ID: ' . $channel->getRequestId());
} else {
right_output('SUCC, ' . __FUNCTION__ . ' OK!!!!!');
right_output('result: ' . print_r($ret, true));
}
}
示例3: test_queryBindList
function test_queryBindList($userId)
{
$apiKey = "Wkabgkvm6HCc092TZLXqt4KN";
$secretKey = "nSpq1vSFiGNaH1ZLzMTf7EkTjf7IbFZl";
$channel = new Channel($apiKey, $secretKey);
// $optional [ Channel::CHANNEL_ID ] = "5462118640880465741";
$ret = $channel->queryBindList($userId);
if (false === $ret) {
error_output('WRONG, ' . __FUNCTION__ . ' ERROR!!!!!');
error_output('ERROR NUMBER: ' . $channel->errno());
error_output('ERROR MESSAGE: ' . $channel->errmsg());
error_output('REQUEST ID: ' . $channel->getRequestId());
} else {
right_output('SUCC, ' . __FUNCTION__ . ' OK!!!!!');
// right_output ( 'result: ' . print_r ( $ret, true ) ) ;
var_dump($ret['response_params']);
}
}