本文整理匯總了PHP中apiClient::setDeveloperSecret方法的典型用法代碼示例。如果您正苦於以下問題:PHP apiClient::setDeveloperSecret方法的具體用法?PHP apiClient::setDeveloperSecret怎麽用?PHP apiClient::setDeveloperSecret使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類apiClient
的用法示例。
在下文中一共展示了apiClient::setDeveloperSecret方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: apiClient
* @package Mashery_IO_Wraps_Rovi
* @author Neil Mansilla <neil@mashery.com>
* @license https://raw.github.com/mashery/io-wraps-rovi-php/master/LICENSE.txt MIT License
* @version GIT: $Id:$
* @link https://github.com/mashery/io-wraps-rovi-php/
*
*/
// Client library (network/authentication)
require_once "../google-api-php-client/src/apiClient.php";
// Rovi resource/method library
require_once "../google-api-php-client/src/contrib/apiMetadataandsearchapiService.php";
// Instantiate client
$client = new apiClient();
// Set credentials
$client->setDeveloperKey("YOUR_KEY_HERE");
$client->setDeveloperSecret("YOUR_SECRET_HERE");
// Instantiate service
$service = new apiMetadataandsearchapiService($client);
// Initialize globals
$searchAPI = array();
$resultsObj = array();
$searchQuery = $_GET['searchQuery'];
$database = "";
$entityType = "";
$searchResultCount = 0;
if ($searchQuery) {
$searchQuery = $_GET['searchQuery'];
$database = $_GET['database'];
$entityType = $_GET['entityType'];
$searchAPI = $service->SearchMethods->Search($database, $entityType, $searchQuery, array("format" => "json"));
$resultsObj = $searchAPI['searchResponse'];