本文整理汇总了PHP中apiClient类的典型用法代码示例。如果您正苦于以下问题:PHP apiClient类的具体用法?PHP apiClient怎么用?PHP apiClient使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了apiClient类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: actionDefault
public function actionDefault()
{
$google_config = NEnvironment::getConfig()->google;
require_once LIBS_DIR . '/google-api-php-client/src/apiClient.php';
require_once LIBS_DIR . '/google-api-php-client/src/contrib/apiOauth2Service.php';
require_once LIBS_DIR . '/google-api-php-client/src/contrib/apiAnalyticsService.php';
$client = new apiClient();
$client->setApplicationName('Google+ PHP Starter Application');
// Visit https://code.google.com/apis/console?api=plus to generate your
// client id, client secret, and to register your redirect uri.
// $client->setClientId( $google_config['client_id'] );
// $client->setClientSecret( $google_config['client_secret'] );
$client->setRedirectUri($google_config['redirect_url']);
// $client->setDeveloperKey('AIzaSyCrViGDrmXAiLsQAoW1aOzkHddH9gHYzzs');
// [8] => Array
// (
// [title] => www.propagacnepredmety.sk
// [entryid] => http://www.google.com/analytics/feeds/accounts/ga:43556790
// [accountId] => 17205615
// [accountName] => www.vizion.sk
// [profileId] => 43556790
// [webPropertyId] => UA-17205615-3
// [tableId] => ga:43556790
// )
$ga = new apiAnalyticsService($client);
if (isset($_GET['code'])) {
$ga->authenticate();
$_SESSION['token'] = $client->getAccessToken();
header('Location: http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']);
}
if (isset($_SESSION['token'])) {
$client->setAccessToken($_SESSION['token']);
}
if ($client->getAccessToken()) {
$activities = $plus->activities->listActivities('me', 'public');
print 'Your Activities: <pre>' . print_r($activities, true) . '</pre>';
// The access token may have been updated.
$_SESSION['token'] = $client->getAccessToken();
} else {
$authUrl = $client->createAuthUrl();
print "<a class='login' href='{$authUrl}'>Connect Me!</a>";
}
// $_SESSION['token'] = $client->getAccessToken();
$data = $ga->data_ga;
$d = $data->get('17205615', date('Y-m-d', time() - 60 * 60 * 24 * 40), date('Y-m-d', time() - 60 * 60 * 24 * 1), 'ga:visits,ga:pageviews');
print_r($d);
exit;
}
开发者ID:oaki,项目名称:demoshop,代码行数:48,代码来源:Admin_Stats_GoogleAnalyticsPresenter.php
示例2: __construct
/**
* Constructs the internal service representations and does the auto-magic configuration required to drive them
*/
public function __construct(apiClient $apiClient)
{
$apiClient->addService('prediction', 'v1.1');
$this->io = $apiClient->getIo();
$this->training = new apiServiceResource($this, $this->serviceName, 'training', json_decode('{"methods":{"insert":{"pathUrl":"prediction\\/v1.1\\/training","rpcName":"prediction.training.insert","httpMethod":"POST","methodType":"rest","parameters":{"data":{"parameterType":"query","required":false}}},"delete":{"pathUrl":"prediction\\/v1.1\\/training\\/{data}","rpcName":"prediction.training.delete","httpMethod":"DELETE","methodType":"rest","parameters":{"data":{"parameterType":"path","pattern":"[^\\/]+","required":true}}},"get":{"pathUrl":"prediction\\/v1.1\\/training\\/{data}","rpcName":"prediction.training.get","httpMethod":"GET","methodType":"rest","parameters":{"data":{"parameterType":"path","pattern":"[^\\/]+","required":true}}}}}', true));
$this->prediction = new apiServiceResource($this, $this->serviceName, 'prediction', json_decode('{"methods":{"predict":{"pathUrl":"prediction\\/v1.1\\/training\\/{data}\\/predict","rpcName":"prediction.predict","httpMethod":"POST","methodType":"rest","parameters":{"input":{"parameterType":"query","required":false},"data":{"parameterType":"path","pattern":"[^\\/]+","required":true}}}}}', true));
}
开发者ID:wty717,项目名称:heka-interactive-google-buzz-app,代码行数:10,代码来源:apiPredictionService.php
示例3: __construct
/**
* Constructs the internal service representations and does the auto-magic configuration required to drive them
*/
public function __construct(apiClient $apiClient)
{
$apiClient->addService('easyhybrid', 'v1');
$this->io = $apiClient->getIo();
$this->useremail = new apiServiceResource($this, $this->serviceName, 'useremail', json_decode('{"methods":{"get":{"pathUrl":"userinfo\\/email","rpcName":"auth.useremail.get","httpMethod":"GET","methodType":"rest"}}}', true));
$this->userinfo = new apiServiceResource($this, $this->serviceName, 'userinfo', json_decode('{"methods":{"get":{"pathUrl":"easyhybrid\\/userinfo","rpcName":"auth.userinfo.get","httpMethod":"GET","methodType":"rest"}}}', true));
}
开发者ID:wty717,项目名称:heka-interactive-google-buzz-app,代码行数:10,代码来源:apiEasyhybridService.php
示例4: __construct
public function __construct() {
global $apiConfig, $apiBuzzTest_apiClient, $apiBuzzTest_buzz;
parent::__construct();
if (! $apiBuzzTest_apiClient || ! $apiBuzzTest_buzz) {
$this->origConfig = $apiConfig;
// Set up a predictable, default environment so the test results are predictable
//$apiConfig['oauth2_client_id'] = 'INSERT_CLIENT_ID';
//$apiConfig['oauth2_client_secret'] = 'INSERT_CLIENT_SECRET';
$apiConfig['authClass'] = 'apiOAuth2';
$apiConfig['ioClass'] = 'apiCurlIO';
$apiConfig['cacheClass'] = 'apiFileCache';
$apiConfig['ioFileCache_directory'] = '/tmp/googleApiTests';
// create the global api and buzz clients (which are shared between the various buzz test suites for performance reasons)
$apiBuzzTest_apiClient = new apiClient();
$apiBuzzTest_buzz = new apiBuzzService($apiBuzzTest_apiClient);
$apiBuzzTest_apiClient->setAccessToken($apiConfig['oauth_test_token']);
}
$this->apiClient = $apiBuzzTest_apiClient;
$this->buzz = $apiBuzzTest_buzz;
}
开发者ID:newshorts,项目名称:Google-Plus-API---PHP,代码行数:25,代码来源:apiBuzzTest.php
示例5: loadEvents
/**
* Load the list of upcoming events in the UPL and return an array containing
* an array of each event's information.
*/
function loadEvents()
{
if (!class_exists('apiClient')) {
return array();
}
// Load up the Google API client
$client = new apiClient();
$client->setApplicationName('UPL Website');
$client->setUseObjects(true);
apiKey($client);
$cal = new apiCalendarService($client);
// List all events in the UPL calendar
$calendarId = '[email protected]';
$args = array('singleEvents' => true, 'orderBy' => 'startTime', 'maxResults' => 5, 'timeMin' => date(DateTime::RFC3339));
$events = $cal->events->listEvents($calendarId, $args);
// Make sure that we at least have some events
if (!$events) {
return array();
}
$events = $events->getItems();
if (!is_array($events)) {
return array();
}
// Just a little helper to convert dates
function makeDate($evtDate)
{
return DateTime::createFromFormat(DateTime::RFC3339, $evtDate->getDateTime());
}
function mapEvent($event)
{
return array('summary' => $event->getSummary(), 'start' => makeDate($event->getStart()), 'end' => makeDate($event->getEnd()), 'description' => $event->getDescription(), 'link' => $event->getHtmlLink());
}
// Retrieve all our events
return array_map(mapEvent, $events);
}
开发者ID:LOZORD,项目名称:UPL-Website-Revamp,代码行数:39,代码来源:events.php
示例6: __construct
/**
* Constructs the internal service representations and does the auto-magic configuration required to drive them
*/
public function __construct(apiClient $apiClient)
{
$apiClient->addService('latitude', 'v1');
$this->io = $apiClient->getIo();
$this->location = new apiServiceResource($this, $this->serviceName, 'location', json_decode('{"methods":{"insert":{"pathUrl":"latitude\\/v1\\/location","rpcName":"latitude.location.insert","httpMethod":"POST","methodType":"rest"},"list":{"pathUrl":"latitude\\/v1\\/location","rpcName":"latitude.location.list","httpMethod":"GET","methodType":"rest","parameters":{"max-time":{"parameterType":"query","required":false},"min-time":{"parameterType":"query","required":false},"max-results":{"parameterType":"query","required":false},"granularity":{"parameterType":"query","required":false}}},"get":{"pathUrl":"latitude\\/v1\\/location\\/{locationId}","rpcName":"latitude.location.get","httpMethod":"GET","methodType":"rest","parameters":{"granularity":{"parameterType":"query","required":false},"locationId":{"parameterType":"path","pattern":"[^\\/]+","required":true}}},"delete":{"pathUrl":"latitude\\/v1\\/location\\/{locationId}","rpcName":"latitude.location.delete","httpMethod":"DELETE","methodType":"rest","parameters":{"locationId":{"parameterType":"path","pattern":"[^\\/]+","required":true}}}}}', true));
$this->currentLocation = new apiServiceResource($this, $this->serviceName, 'currentLocation', json_decode('{"methods":{"insert":{"pathUrl":"latitude\\/v1\\/currentLocation","rpcName":"latitude.currentLocation.insert","httpMethod":"POST","methodType":"rest"},"delete":{"pathUrl":"latitude\\/v1\\/currentLocation","rpcName":"latitude.currentLocation.delete","httpMethod":"DELETE","methodType":"rest"},"get":{"pathUrl":"latitude\\/v1\\/currentLocation","rpcName":"latitude.currentLocation.get","httpMethod":"GET","methodType":"rest","parameters":{"granularity":{"parameterType":"query","required":false}}}}}', true));
}
开发者ID:wty717,项目名称:heka-interactive-google-buzz-app,代码行数:10,代码来源:apiLatitudeService.php
示例7: __construct
/**
* Constructs the internal representation of the Pagespeedonline service.
*
* @param apiClient apiClient
*/
public function __construct(apiClient $apiClient)
{
$this->restBasePath = '/pagespeedonline/v1/';
$this->version = 'v1';
$this->serviceName = 'pagespeedonline';
$apiClient->addService($this->serviceName, $this->version);
$this->pagespeedapi = new PagespeedapiServiceResource($this, $this->serviceName, 'pagespeedapi', json_decode('{"methods": {"runpagespeed": {"parameters": {"locale": {"type": "string", "location": "query"}, "url": {"required": true, "type": "string", "location": "query"}, "rule": {"repeated": true, "type": "string", "location": "query"}, "strategy": {"enum": ["desktop", "mobile"], "type": "string", "location": "query"}}, "id": "pagespeedonline.pagespeedapi.runpagespeed", "httpMethod": "GET", "path": "runPagespeed", "response": {"$ref": "Result"}}}}', true));
}
开发者ID:shanky0110,项目名称:pimcore-custom,代码行数:13,代码来源:apiPagespeedonlineService.php
示例8: __construct
/**
* Constructs the internal representation of the Webfonts service.
*
* @param apiClient apiClient
*/
public function __construct(apiClient $apiClient)
{
$this->restBasePath = '/webfonts/v1/';
$this->version = 'v1';
$this->serviceName = 'webfonts';
$apiClient->addService($this->serviceName, $this->version);
$this->webfonts = new WebfontsServiceResource($this, $this->serviceName, 'webfonts', json_decode('{"methods": {"list": {"parameters": {"sort": {"enum": ["alpha", "date", "popularity", "style", "trending"], "type": "string", "location": "query"}}, "id": "webfonts.webfonts.list", "httpMethod": "GET", "path": "webfonts", "response": {"$ref": "WebfontList"}}}}', true));
}
开发者ID:shanky0110,项目名称:pimcore-custom,代码行数:13,代码来源:apiWebfontsService.php
示例9: __construct
/**
* Constructs the internal representation of the Autocompleteapi service.
*
* @param apiClient apiClient
*/
public function __construct(apiClient $apiClient)
{
$this->rpcPath = '/rpc';
$this->restBasePath = '/search/v2/';
$this->version = '1.0';
$this->serviceName = 'autocompleteapi';
$this->io = $apiClient->getIo();
$apiClient->addService($this->serviceName, $this->version);
$this->AutocompleteMethods = new AutocompleteMethodsServiceResource($this, $this->serviceName, 'AutocompleteMethods', json_decode('{"methods": {"Autocomplete": {"path": "{endpoint}/autocomplete", "httpMethod": "GET", "id": "AutocompleteAPI.Autocomplete", "parameters": {"endpoint": {"required": true, "default": "music", "enum": ["music", "amgvideo", "video"], "location": "path", "type": "string"}, "language": {"default": "en", "required": false, "type": "string", "location": "query"}, "format": {"required": false, "default": "json", "enum": ["json", "xml"], "location": "query", "type": "string"}, "country": {"default": "US", "required": false, "type": "string", "location": "query"}, "entitytype": {"required": true, "default": "", "enum": ["album", "song", "artist", "movie", "tvseries", "credit", "movie", "tvseries", "onetimeonly", "credit"], "location": "query", "type": "string"}, "filter": {"default": "", "required": false, "type": "string", "location": "query"}, "query": {"default": "", "required": true, "type": "string", "location": "query"}, "size": {"default": 20, "required": false, "type": "integer", "location": "query"}}}}}', true));
}
开发者ID:nortron,项目名称:io-wraps-rovi-php,代码行数:15,代码来源:apiAutocompleteapiService.php
示例10: __construct
/**
* Constructs the internal service representations and does the auto-magic configuration required to drive them
*/
public function __construct(apiClient $apiClient)
{
$apiClient->addService('buzz', 'v1');
$this->io = $apiClient->getIo();
$this->photos = new apiServiceResource($this, $this->serviceName, 'photos', json_decode('{"methods":{"insert":{"pathUrl":"buzz\\/v1\\/photos\\/{userId}\\/{albumId}","rpcName":"buzz.photos.insert","httpMethod":"POST","methodType":"rest","parameters":{"albumId":{"parameterType":"path","pattern":"[^\\/]+","required":true},"userId":{"parameterType":"path","pattern":"[^\\/]+","required":true},"hl":{"parameterType":"query","required":false}}}}}', true));
$this->feeds = new apiServiceResource($this, $this->serviceName, 'feeds', json_decode('{"methods":{"insert":{"pathUrl":"buzz\\/v1\\/feeds\\/{userId}\\/@self","rpcName":"buzz.feeds.insert","httpMethod":"POST","methodType":"rest","parameters":{"alt":{"parameterType":"query","required":false},"userId":{"parameterType":"path","pattern":"[^\\/]+","required":true},"hl":{"parameterType":"query","required":false}}},"update":{"pathUrl":"buzz\\/v1\\/feeds\\/{userId}\\/@self\\/{siteId}","rpcName":"buzz.feeds.update","httpMethod":"PUT","methodType":"rest","parameters":{"siteId":{"parameterType":"path","pattern":"[^\\/]+","required":true},"max-results":{"parameterType":"query","required":false},"c":{"parameterType":"query","required":false},"alt":{"parameterType":"query","required":false},"userId":{"parameterType":"path","pattern":"[^\\/]+","required":true},"hl":{"parameterType":"query","required":false}}},"list":{"pathUrl":"buzz\\/v1\\/feeds\\/{userId}\\/{scope}","rpcName":"buzz.feeds.list","httpMethod":"GET","methodType":"rest","parameters":{"scope":{"parameterType":"path","pattern":"@.*","required":true},"alt":{"parameterType":"query","required":false},"userId":{"parameterType":"path","pattern":"[^\\/]+","required":true},"hl":{"parameterType":"query","required":false}}},"delete":{"pathUrl":"buzz\\/v1\\/feeds\\/{userId}\\/@self\\/{siteId}","rpcName":"buzz.feeds.delete","httpMethod":"DELETE","methodType":"rest","parameters":{"siteId":{"parameterType":"path","pattern":"[^\\/]+","required":true},"alt":{"parameterType":"query","required":false},"userId":{"parameterType":"path","pattern":"[^\\/]+","required":true},"hl":{"parameterType":"query","required":false}}}}}', true));
$this->activities = new apiServiceResource($this, $this->serviceName, 'activities', json_decode('{"methods":{"update":{"pathUrl":"buzz\\/v1\\/activities\\/{userId}\\/{scope}\\/{postId}","rpcName":"buzz.activities.update","httpMethod":"PUT","methodType":"rest","parameters":{"scope":{"parameterType":"path","pattern":"@.*","required":true},"alt":{"parameterType":"query","required":false},"userId":{"parameterType":"path","pattern":"[^\\/]+","required":true},"postId":{"parameterType":"path","pattern":".*","required":true},"hl":{"parameterType":"query","required":false},"abuseType":{"parameterType":"query","required":false}}},"extractPeopleFromSearch":{"pathUrl":"buzz\\/v1\\/activities\\/search\\/@people","rpcName":"buzz.activities.extractPeopleFromSearch","httpMethod":"POST","methodType":"rest","parameters":{"lon":{"parameterType":"query","required":false},"max-results":{"parameterType":"query","required":false},"c":{"parameterType":"query","required":false},"bbox":{"parameterType":"query","required":false},"q":{"parameterType":"query","required":false},"alt":{"parameterType":"query","required":false},"pid":{"parameterType":"query","required":false},"radius":{"parameterType":"query","required":false},"lat":{"parameterType":"query","required":false},"hl":{"parameterType":"query","required":false}}},"delete":{"pathUrl":"buzz\\/v1\\/activities\\/{userId}\\/{scope}\\/{postId}","rpcName":"buzz.activities.delete","httpMethod":"DELETE","methodType":"rest","parameters":{"scope":{"parameterType":"path","pattern":"@.*","required":true},"alt":{"parameterType":"query","required":false},"userId":{"parameterType":"path","pattern":"[^\\/]+","required":true},"postId":{"parameterType":"path","pattern":".*","required":true},"hl":{"parameterType":"query","required":false}}},"insert":{"pathUrl":"buzz\\/v1\\/activities\\/{userId}\\/@self","rpcName":"buzz.activities.insert","httpMethod":"POST","methodType":"rest","parameters":{"preview":{"parameterType":"query","required":false},"alt":{"parameterType":"query","required":false},"userId":{"parameterType":"path","pattern":"[^\\/]+","required":true},"photo":{"parameterType":"query","required":false},"hl":{"parameterType":"query","required":false}}},"list":{"pathUrl":"buzz\\/v1\\/activities\\/{userId}\\/{scope}","rpcName":"buzz.activities.list","httpMethod":"GET","methodType":"rest","parameters":{"max-comments":{"parameterType":"query","required":false},"scope":{"parameterType":"path","pattern":"@(self|public|consumption|liked|comments)*","required":true},"max-results":{"parameterType":"query","required":false},"c":{"parameterType":"query","required":false},"alt":{"parameterType":"query","required":false},"userId":{"parameterType":"path","pattern":"[^\\/]+","required":true},"max-liked":{"parameterType":"query","required":false},"hl":{"parameterType":"query","required":false}}},"get":{"pathUrl":"buzz\\/v1\\/activities\\/{userId}\\/@self\\/{postId}","rpcName":"buzz.activities.get","httpMethod":"GET","methodType":"rest","parameters":{"alt":{"parameterType":"query","required":false},"userId":{"parameterType":"path","pattern":"[^\\/]+","required":true},"postId":{"parameterType":"path","pattern":".*","required":true},"hl":{"parameterType":"query","required":false}}},"search":{"pathUrl":"buzz\\/v1\\/activities\\/search","rpcName":"buzz.activities.search","httpMethod":"POST","methodType":"rest","parameters":{"lon":{"parameterType":"query","required":false},"max-results":{"parameterType":"query","required":false},"c":{"parameterType":"query","required":false},"bbox":{"parameterType":"query","required":false},"q":{"parameterType":"query","required":false},"alt":{"parameterType":"query","required":false},"pid":{"parameterType":"query","required":false},"radius":{"parameterType":"query","required":false},"lat":{"parameterType":"query","required":false},"hl":{"parameterType":"query","required":false}}}}}', true));
$this->people = new apiServiceResource($this, $this->serviceName, 'people', json_decode('{"methods":{"get":{"pathUrl":"buzz\\/v1\\/people\\/{userId}\\/@self","rpcName":"buzz.people.get","httpMethod":"GET","methodType":"rest","parameters":{"alt":{"parameterType":"query","required":false},"userId":{"parameterType":"path","pattern":"[^\\/]+","required":true},"hl":{"parameterType":"query","required":false}}},"search":{"pathUrl":"buzz\\/v1\\/people\\/search","rpcName":"buzz.people.search","httpMethod":"POST","methodType":"rest","parameters":{"max-results":{"parameterType":"query","required":false},"c":{"parameterType":"query","required":false},"q":{"parameterType":"query","required":false},"alt":{"parameterType":"query","required":false},"hl":{"parameterType":"query","required":false}}},"list":{"pathUrl":"buzz\\/v1\\/people\\/{userId}\\/@groups\\/{groupId}","rpcName":"buzz.people.list","httpMethod":"GET","methodType":"rest","parameters":{"groupId":{"parameterType":"path","pattern":"[^\\/]+","required":true},"max-results":{"parameterType":"query","required":false},"c":{"parameterType":"query","required":false},"alt":{"parameterType":"query","required":false},"userId":{"parameterType":"path","pattern":"[^\\/]+","required":true},"hl":{"parameterType":"query","required":false}}},"relatedToUri":{"pathUrl":"buzz\\/v1\\/people\\/{userId}\\/@related","rpcName":"buzz.people.relatedToUri","httpMethod":"POST","methodType":"rest","parameters":{"alt":{"parameterType":"query","required":false},"uri":{"parameterType":"query","required":false},"hl":{"parameterType":"query","required":false}}},"reshared":{"pathUrl":"buzz\\/v1\\/activities\\/{userId}\\/{scope}\\/{postId}\\/{groupId}","rpcName":"buzz.people.reshared","httpMethod":"POST","methodType":"rest","parameters":{"groupId":{"parameterType":"path","pattern":"@reshared","required":true},"max-results":{"parameterType":"query","required":false},"c":{"parameterType":"query","required":false},"alt":{"parameterType":"query","required":false},"userId":{"parameterType":"path","pattern":"[^\\/]+","required":true},"postId":{"parameterType":"path","pattern":".*","required":true},"hl":{"parameterType":"query","required":false}}},"delete":{"pathUrl":"buzz\\/v1\\/people\\/{userId}\\/@groups\\/{groupId}\\/{personId}","rpcName":"buzz.people.delete","httpMethod":"DELETE","methodType":"rest","parameters":{"groupId":{"parameterType":"path","pattern":"[^\\/]+","required":true},"alt":{"parameterType":"query","required":false},"userId":{"parameterType":"path","pattern":"[^\\/]+","required":true},"personId":{"parameterType":"path","pattern":"(?!@self).*","required":true},"hl":{"parameterType":"query","required":false}}},"update":{"pathUrl":"buzz\\/v1\\/people\\/{userId}\\/@groups\\/{groupId}\\/{personId}","rpcName":"buzz.people.update","httpMethod":"PUT","methodType":"rest","parameters":{"groupId":{"parameterType":"path","pattern":"[^\\/]+","required":true},"alt":{"parameterType":"query","required":false},"userId":{"parameterType":"path","pattern":"[^\\/]+","required":true},"personId":{"parameterType":"path","pattern":"(?!@self).*","required":true},"hl":{"parameterType":"query","required":false}}},"liked":{"pathUrl":"buzz\\/v1\\/activities\\/{userId}\\/{scope}\\/{postId}\\/{groupId}","rpcName":"buzz.people.liked","httpMethod":"POST","methodType":"rest","parameters":{"groupId":{"parameterType":"path","pattern":"@liked","required":true},"max-results":{"parameterType":"query","required":false},"c":{"parameterType":"query","required":false},"alt":{"parameterType":"query","required":false},"userId":{"parameterType":"path","pattern":"[^\\/]+","required":true},"postId":{"parameterType":"path","pattern":".*","required":true},"hl":{"parameterType":"query","required":false}}}}}', true));
$this->groups = new apiServiceResource($this, $this->serviceName, 'groups', json_decode('{"methods":{"get":{"pathUrl":"buzz\\/v1\\/people\\/{userId}\\/@groups\\/{groupId}\\/@self","rpcName":"buzz.groups.get","httpMethod":"GET","methodType":"rest","parameters":{"groupId":{"parameterType":"path","pattern":"[^\\/]+","required":true},"alt":{"parameterType":"query","required":false},"userId":{"parameterType":"path","pattern":"[^\\/]+","required":true},"hl":{"parameterType":"query","required":false}}},"list":{"pathUrl":"buzz\\/v1\\/people\\/{userId}\\/@groups","rpcName":"buzz.groups.list","httpMethod":"GET","methodType":"rest","parameters":{"max-results":{"parameterType":"query","required":false},"c":{"parameterType":"query","required":false},"alt":{"parameterType":"query","required":false},"userId":{"parameterType":"path","pattern":"[^\\/]+","required":true},"hl":{"parameterType":"query","required":false}}},"delete":{"pathUrl":"buzz\\/v1\\/people\\/{userId}\\/@groups\\/{groupId}","rpcName":"buzz.groups.delete","httpMethod":"DELETE","methodType":"rest","parameters":{"groupId":{"parameterType":"path","pattern":"[^\\/]+","required":true},"alt":{"parameterType":"query","required":false},"userId":{"parameterType":"path","pattern":"[^\\/]+","required":true},"hl":{"parameterType":"query","required":false}}},"update":{"pathUrl":"buzz\\/v1\\/people\\/{userId}\\/@groups\\/{groupId}\\/@self","rpcName":"buzz.groups.update","httpMethod":"PUT","methodType":"rest","parameters":{"groupId":{"parameterType":"path","pattern":"[^\\/]+","required":true},"userId":{"parameterType":"path","pattern":"[^\\/]+","required":true},"hl":{"parameterType":"query","required":false}}},"insert":{"pathUrl":"buzz\\/v1\\/people\\/{userId}\\/@groups","rpcName":"buzz.groups.insert","httpMethod":"POST","methodType":"rest","parameters":{"alt":{"parameterType":"query","required":false},"userId":{"parameterType":"path","pattern":"[^\\/]+","required":true},"hl":{"parameterType":"query","required":false}}}}}', true));
$this->comments = new apiServiceResource($this, $this->serviceName, 'comments', json_decode('{"methods":{"update":{"pathUrl":"buzz\\/v1\\/activities\\/{userId}\\/{scope}\\/{postId}\\/@comments\\/{commentId}","rpcName":"buzz.comments.update","httpMethod":"PUT","methodType":"rest","parameters":{"scope":{"parameterType":"path","pattern":"@.*","required":true},"alt":{"parameterType":"query","required":false},"userId":{"parameterType":"path","pattern":"[^\\/]+","required":true},"commentId":{"parameterType":"path","pattern":"[^\\/]+","required":true},"postId":{"parameterType":"path","pattern":".*","required":true},"hl":{"parameterType":"query","required":false},"abuseType":{"parameterType":"query","required":false}}},"list":{"pathUrl":"buzz\\/v1\\/activities\\/{userId}\\/{scope}\\/{postId}\\/@comments","rpcName":"buzz.comments.list","httpMethod":"GET","methodType":"rest","parameters":{"scope":{"parameterType":"path","pattern":"@.*","required":true},"max-results":{"parameterType":"query","required":false},"c":{"parameterType":"query","required":false},"alt":{"parameterType":"query","required":false},"userId":{"parameterType":"path","pattern":"[^\\/]+","required":true},"postId":{"parameterType":"path","pattern":".*","required":true},"hl":{"parameterType":"query","required":false}}},"delete":{"pathUrl":"buzz\\/v1\\/activities\\/{userId}\\/@self\\/{postId}\\/@comments\\/{commentId}","rpcName":"buzz.comments.delete","httpMethod":"DELETE","methodType":"rest","parameters":{"alt":{"parameterType":"query","required":false},"userId":{"parameterType":"path","pattern":"[^\\/]+","required":true},"commentId":{"parameterType":"path","pattern":"[^\\/]+","required":true},"postId":{"parameterType":"path","pattern":".*","required":true},"hl":{"parameterType":"query","required":false}}},"insert":{"pathUrl":"buzz\\/v1\\/activities\\/{userId}\\/@self\\/{postId}\\/@comments","rpcName":"buzz.comments.insert","httpMethod":"POST","methodType":"rest","parameters":{"alt":{"parameterType":"query","required":false},"userId":{"parameterType":"path","pattern":"[^\\/]+","required":true},"postId":{"parameterType":"path","pattern":".*","required":true},"hl":{"parameterType":"query","required":false}}},"get":{"pathUrl":"buzz\\/v1\\/activities\\/{userId}\\/@self\\/{postId}\\/@comments\\/{commentId}","rpcName":"buzz.comments.get","httpMethod":"GET","methodType":"rest","parameters":{"alt":{"parameterType":"query","required":false},"userId":{"parameterType":"path","pattern":"[^\\/]+","required":true},"commentId":{"parameterType":"path","pattern":"[^\\/]+","required":true},"postId":{"parameterType":"path","pattern":".*","required":true},"hl":{"parameterType":"query","required":false}}}}}', true));
$this->related = new apiServiceResource($this, $this->serviceName, 'related', json_decode('{"methods":{"list":{"pathUrl":"buzz\\/v1\\/activities\\/{userId}\\/{scope}\\/{postId}\\/@related","rpcName":"buzz.related.list","httpMethod":"GET","methodType":"rest","parameters":{"scope":{"parameterType":"path","pattern":"@.*","required":true},"max-results":{"parameterType":"query","required":false},"c":{"parameterType":"query","required":false},"alt":{"parameterType":"query","required":false},"userId":{"parameterType":"path","pattern":"[^\\/]+","required":true},"hl":{"parameterType":"query","required":false},"postId":{"parameterType":"path","pattern":".*","required":true}}}}}', true));
}
开发者ID:wty717,项目名称:heka-interactive-google-buzz-app,代码行数:15,代码来源:apiBuzzService.php
示例11: __construct
/**
* Constructs the internal service representations and does the auto-magic configuration required to drive them
*/
public function __construct(apiClient $apiClient)
{
$apiClient->addService('moderator', 'v1');
$this->io = $apiClient->getIo();
$this->tags = new apiServiceResource($this, $this->serviceName, 'tags', json_decode('{"methods":{"delete":{"pathUrl":"moderator\\/v1\\/series\\/{seriesId}\\/submissions\\/{submissionId}\\/tags\\/{tagId}","rpcName":"moderator.tags.delete","httpMethod":"DELETE","methodType":"rest","parameters":{"tagId":{"parameterType":"path","pattern":"[^\\/]+","required":true},"seriesId":{"parameterType":"path","pattern":"[^\\/]+","required":true},"submissionId":{"parameterType":"path","pattern":"[^\\/]+","required":true}}},"list":{"pathUrl":"moderator\\/v1\\/series\\/{seriesId}\\/submissions\\/{submissionId}\\/tags","rpcName":"moderator.tags.list","httpMethod":"GET","methodType":"rest","parameters":{"seriesId":{"parameterType":"path","pattern":"[^\\/]+","required":true},"submissionId":{"parameterType":"path","pattern":"[^\\/]+","required":true}}},"insert":{"pathUrl":"moderator\\/v1\\/series\\/{seriesId}\\/submissions\\/{submissionId}\\/tags","rpcName":"moderator.tags.insert","httpMethod":"POST","methodType":"rest","parameters":{"seriesId":{"parameterType":"path","pattern":"[^\\/]+","required":true},"submissionId":{"parameterType":"path","pattern":"[^\\/]+","required":true}}}}}', true));
$this->series = new apiServiceResource($this, $this->serviceName, 'series', json_decode('{"methods":{"list":{"pathUrl":"moderator\\/v1\\/series\\/featured","rpcName":"moderator.featured.series.list","httpMethod":"GET","methodType":"rest"},"update":{"pathUrl":"moderator\\/v1\\/series\\/{seriesId}","rpcName":"moderator.series.update","httpMethod":"PUT","methodType":"rest","parameters":{"seriesId":{"parameterType":"path","pattern":"[^\\/]+","required":true}}},"insert":{"pathUrl":"moderator\\/v1\\/series","rpcName":"moderator.series.insert","httpMethod":"POST","methodType":"rest"},"get":{"pathUrl":"moderator\\/v1\\/series\\/{seriesId}","rpcName":"moderator.series.get","httpMethod":"GET","methodType":"rest","parameters":{"seriesId":{"parameterType":"path","pattern":"[^\\/]+","required":true}}}}}', true));
$this->topics = new apiServiceResource($this, $this->serviceName, 'topics', json_decode('{"methods":{"list":{"pathUrl":"moderator\\/v1\\/series\\/{seriesId}\\/topics","rpcName":"moderator.topics.list","httpMethod":"GET","methodType":"rest","parameters":{"max-results":{"parameterType":"query","required":false},"start-index":{"parameterType":"query","required":false},"seriesId":{"parameterType":"path","pattern":"[^\\/]+","required":true}}},"insert":{"pathUrl":"moderator\\/v1\\/series\\/{seriesId}\\/topics","rpcName":"moderator.topics.insert","httpMethod":"POST","methodType":"rest","parameters":{"seriesId":{"parameterType":"path","pattern":"[^\\/]+","required":true}}},"get":{"pathUrl":"moderator\\/v1\\/series\\/{seriesId}\\/topics\\/{topicId}","rpcName":"moderator.topics.get","httpMethod":"GET","methodType":"rest","parameters":{"topicId":{"parameterType":"path","pattern":"[^\\/]+","required":true},"seriesId":{"parameterType":"path","pattern":"[^\\/]+","required":true}}}}}', true));
$this->votes = new apiServiceResource($this, $this->serviceName, 'votes', json_decode('{"methods":{"update":{"pathUrl":"moderator\\/v1\\/series\\/{seriesId}\\/submissions\\/{submissionId}\\/votes\\/@me","rpcName":"moderator.votes.update","httpMethod":"PUT","methodType":"rest","parameters":{"userId":{"parameterType":"query","required":false},"seriesId":{"parameterType":"path","pattern":"[^\\/]+","required":true},"submissionId":{"parameterType":"path","pattern":"[^\\/]+","required":true}}},"list":{"pathUrl":"moderator\\/v1\\/series\\/{seriesId}\\/votes\\/@me","rpcName":"moderator.votes.list","httpMethod":"GET","methodType&quo
|
请发表评论