本文整理汇总了PHP中Credentials::getSecretKey方法的典型用法代码示例。如果您正苦于以下问题:PHP Credentials::getSecretKey方法的具体用法?PHP Credentials::getSecretKey怎么用?PHP Credentials::getSecretKey使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Credentials
的用法示例。
在下文中一共展示了Credentials::getSecretKey方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ListVideoOutputsForArticle
/**
* Lists the video outputs under a particular article.
*
* @param int articleId
* @param int $offset offset to skip
* @param int $limit The limit to apply to the list (maximum 100)
* @param array $properties array of properties to add to querystring
* @param array $array of fields to add to querystring
* @return AdferoVideoOutputList
*/
private function ListVideoOutputsForArticle($articleId, $offset, $limit, $properties, $fields)
{
$uri = $this->GetUri($articleId, "articleId", "xml", $properties, $fields, $offset, $limit);
$uri = "http://" . $this->credentials->getPublicKey() . ":" . $this->credentials->getSecretKey() . "@" . str_replace("http://", "", $uri);
$xmlString = AdferoHelpers::GetXMLFromUri($uri);
$videoOutputs = $this->ListVideoOutputsFromXmlString($xmlString);
$videoOutputs->limit = $limit;
$videoOutputs->offset = $offset;
return $videoOutputs;
}
示例2: GetVideoPlayerRaw
/**
* Gets the response from the api in string format
*
* @param int $articleId Id of the article from which to get the video player
* @param Players $playerName Name of the player to display embed code for
* @param Version $playerVersion Version of the player to display embed code for
* @param Players $fallbackPlayerName Name of the fallback player to display embed code for if the primary player isn't supported by the browser
* @param Version $fallbackPlayerVersion Version of the fallback player to display embed code for if the primary player isn't supported by the browser
* @param array $properties array of properties to add to querystring
* @param array $fields array of fields to add to querystring
* @param string $format can be either "xml" or "json"
* @return string
* @throws InvalidArgumentException
*/
private function GetVideoPlayerRaw($articleId, $playerName, $playerVersion, $fallbackPlayerName, $fallbackPlayerVersion, $properties, $fields, $format)
{
switch ($format) {
case "xml":
$uri = $this->GetUri($articleId, $playerName, $playerVersion, $fallbackPlayerName, $fallbackPlayerVersion, "xml", $properties, $fields);
break;
case "json":
$uri = $this->GetUri($articleId, $playerName, $playerVersion, $fallbackPlayerName, $fallbackPlayerVersion, "json", $properties, $fields);
break;
default:
throw new \InvalidArgumentException($format . 'format not supported');
break;
}
$uri = "http://" . $this->credentials->getPublicKey() . ":" . $this->credentials->getSecretKey() . "@" . str_replace("http://", "", $uri);
return AdferoHelpers::GetRawResponse($uri);
}