本文整理汇总了PHP中apiClient::getIo方法的典型用法代码示例。如果您正苦于以下问题:PHP apiClient::getIo方法的具体用法?PHP apiClient::getIo怎么用?PHP apiClient::getIo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类apiClient
的用法示例。
在下文中一共展示了apiClient::getIo方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testSettersGetters
public function testSettersGetters()
{
$client = new apiClient();
$client->setClientId("client1");
$client->setClientSecret('client1secret');
$client->setState('1');
$client->setApprovalPrompt('force');
$client->setAccessType('offline');
global $apiConfig;
$this->assertEquals('client1', $apiConfig['oauth2_client_id']);
$this->assertEquals('client1secret', $apiConfig['oauth2_client_secret']);
$client->setRedirectUri('localhost');
$client->setApplicationName('me');
$client->setUseObjects(false);
$this->assertEquals('object', gettype($client->getAuth()));
$this->assertEquals('object', gettype($client->getCache()));
$this->assertEquals('object', gettype($client->getIo()));
$client->setAuthClass('apiAuthNone');
$client->setAuthClass('apiOAuth2');
try {
$client->setAccessToken(null);
die('Should have thrown an apiAuthException.');
} catch (apiAuthException $e) {
$this->assertEquals('Could not json decode the access token', $e->getMessage());
}
$token = json_encode(array('access_token' => 'token'));
$client->setAccessToken($token);
$this->assertEquals($token, $client->getAccessToken());
}
示例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));
}
示例3: __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));
}
示例4: __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));
}
示例5: __construct
/**
* Constructs the internal representation of the Pagespeedonline service.
*
* @param apiClient apiClient
*/
public function __construct(apiClient $apiClient)
{
$this->rpcPath = '/rpc';
$this->restBasePath = '/pagespeedonline/v1/';
$this->version = 'v1';
$this->serviceName = 'pagespeedonline';
$this->io = $apiClient->getIo();
$apiClient->addService($this->serviceName, $this->version);
$this->pagespeedapi = new PagespeedapiServiceResource($this, $this->serviceName, 'pagespeedapi', json_decode('{"methods": {"runpagespeed": {"parameters": {"locale": {"pattern": "[a-zA-Z]+(_[a-zA-Z]+)?", "type": "string", "location": "query"}, "url": {"pattern": "http(s)?://.*", "required": true, "type": "string", "location": "query"}, "rule": {"pattern": "[a-zA-Z]+", "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));
}
示例6: __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));
}
示例7: __construct
/**
* Constructs the internal representation of the Webfonts service.
*
* @param apiClient apiClient
*/
public function __construct(apiClient $apiClient)
{
$this->rpcPath = '/rpc';
$this->restBasePath = '/webfonts/v1/';
$this->version = 'v1';
$this->serviceName = 'webfonts';
$this->io = $apiClient->getIo();
$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));
}
示例8: __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":"rest","parameters":{"max-results":{"parameterType":"query","required":false},"start-index":{"parameterType":"query","required":false},"seriesId":{"parameterType":"path","pattern":"[^\\/]+","required":true}}},"get":{"pathUrl":"moderator\\/v1\\/series\\/{seriesId}\\/submissions\\/{submissionId}\\/votes\\/@me","rpcName":"moderator.votes.get","httpMethod":"GET","methodType":"rest","parameters":{"userId":{"parameterType":"query","required":false},"seriesId":{"parameterType":"path","pattern":"[^\\/]+","required":true},"submissionId":{"parameterType":"path","pattern":"[^\\/]+","required":true}}},"insert":{"pathUrl":"moderator\\/v1\\/series\\/{seriesId}\\/submissions\\/{submissionId}\\/votes\\/@me","rpcName":"moderator.votes.insert","httpMethod":"POST","methodType":"rest","parameters":{"seriesId":{"parameterType":"path","pattern":"[^\\/]+","required":true},"submissionId":{"parameterType":"path","pattern":"[^\\/]+","required":true}}}}}', true));
$this->submissions = new apiServiceResource($this, $this->serviceName, 'submissions', json_decode('{"methods":{"get":{"pathUrl":"moderator\\/v1\\/series\\/{seriesId}\\/submissions\\/{submissionId}","rpcName":"moderator.submissions.get","httpMethod":"GET","methodType":"rest","parameters":{"seriesId":{"parameterType":"path","pattern":"[^\\/]+","required":true},"submissionId":{"parameterType":"path","pattern":"[^\\/]+","required":true}}},"list":{"pathUrl":"moderator\\/v1\\/series\\/{seriesId}\\/topics\\/{topicId}\\/submissions","rpcName":"moderator.topics.submissions.list","httpMethod":"GET","methodType":"rest","parameters":{"author":{"parameterType":"query","required":false},"hasAttachedVideo":{"parameterType":"query","required":false},"sort":{"parameterType":"query","required":false},"max-results":{"parameterType":"query","required":false},"q":{"parameterType":"query","required":false},"topicId":{"parameterType":"path","pattern":"[^\\/]+","required":true},"start-index":{"parameterType":"query","required":false},"seriesId":{"parameterType":"path","pattern":"[^\\/]+","required":true}}},"insert":{"pathUrl":"moderator\\/v1\\/series\\/{seriesId}\\/topics\\/{topicId}\\/submissions","rpcName":"moderator.submissions.insert","httpMethod":"POST","methodType":"rest","parameters":{"topicId":{"parameterType":"path","pattern":"[^\\/]+","required":true},"seriesId":{"parameterType":"path","pattern":"[^\\/]+","required":true}}}}}', true));
$this->profiles = new apiServiceResource($this, $this->serviceName, 'profiles', json_decode('{"methods":{"get":{"pathUrl":"moderator\\/v1\\/profiles\\/@me","rpcName":"moderator.profiles.get","httpMethod":"GET","methodType":"rest"},"update":{"pathUrl":"moderator\\/v1\\/profiles\\/@me","rpcName":"moderator.profiles.update","httpMethod":"PUT","methodType":"rest"}}}', true));
$this->responses = new apiServiceResource($this, $this->serviceName, 'responses', json_decode('{"methods":{"insert":{"pathUrl":"moderator\\/v1\\/series\\/{seriesId}\\/topics\\/{topicId}\\/submissions\\/{parentSubmissionId}\\/responses","rpcName":"moderator.responses.insert","httpMethod":"POST","methodType":"rest","parameters":{"parentSubmissionId":{"parameterType":"path","pattern":"[^\\/]+","required":true},"topicId":{"parameterType":"path","pattern":"[^\\/]+","required":true},"seriesId":{"parameterType":"path","pattern":"[^\\/]+","required":true}}},"list":{"pathUrl":"moderator\\/v1\\/series\\/{seriesId}\\/responses","rpcName":"moderator.series.responses.list","httpMethod":"GET","methodType":"rest","parameters":{"author":{"parameterType":"query","required":false},"hasAttachedVideo":{"parameterType":"query","required":false},"sort":{"parameterType":"query","required":false},"max-results":{"parameterType":"query","required":false},"q":{"parameterType":"query","required":false},"start-index":{"parameterType":"query","required":false},"seriesId":{"parameterType":"path","pattern":"[^\\/]+","required":true}}}}}', true));
}
示例9: __construct
/**
* Constructs the internal representation of the Orkut service.
*
* @param apiClient apiClient
*/
public function __construct(apiClient $apiClient)
{
$this->rpcPath = '/rpc';
$this->restBasePath = '/orkut/v2/';
$this->version = 'v2';
$this->serviceName = 'orkut';
$this->io = $apiClient->getIo();
$apiClient->addService($this->serviceName, $this->version);
$this->activities = new ActivitiesServiceResource($this, $this->serviceName, 'activities', json_decode('{"methods": {"list": {"scopes": ["https://www.googleapis.com/auth/orkut", "https://www.googleapis.com/auth/orkut.readonly"], "parameters": {"collection": {"required": true, "enum": ["all", "scraps", "stream"], "location": "path", "type": "string"}, "pageToken": {"type": "string", "location": "query"}, "userId": {"required": true, "type": "string", "location": "path"}, "hl": {"type": "string", "location": "query"}, "maxResults": {"format": "uint32", "maximum": "100", "minimum": "1", "location": "query", "type": "integer"}}, "id": "orkut.activities.list", "httpMethod": "GET", "path": "people/{userId}/activities/{collection}", "response": {"$ref": "ActivityList"}}, "delete": {"scopes": ["https://www.googleapis.com/auth/orkut"], "parameters": {"activityId": {"required": true, "type": "string", "location": "path"}}, "httpMethod": "DELETE", "path": "activities/{activityId}", "id": "orkut.activities.delete"}}}', true));
$this->comments = new CommentsServiceResource($this, $this->serviceName, 'comments', json_decode('{"methods": {"insert": {"scopes": ["https://www.googleapis.com/auth/orkut"], "parameters": {"activityId": {"required": true, "type": "string", "location": "path"}}, "request": {"$ref": "Comment"}, "id": "orkut.comments.insert", "httpMethod": "POST", "path": "activities/{activityId}/comments", "response": {"$ref": "Comment"}}, "delete": {"scopes": ["https://www.googleapis.com/auth/orkut"], "parameters": {"commentId": {"required": true, "type": "string", "location": "path"}}, "httpMethod": "DELETE", "path": "comments/{commentId}", "id": "orkut.comments.delete"}, "list": {"scopes": ["https://www.googleapis.com/auth/orkut", "https://www.googleapis.com/auth/orkut.readonly"], "parameters": {"orderBy": {"default": "DESCENDING_SORT", "enum": ["ascending", "descending"], "location": "query", "type": "string"}, "pageToken": {"type": "string", "location": "query"}, "activityId": {"required": true, "type": "string", "location": "path"}, "hl": {"type": "string", "location": "query"}, "maxResults": {"format": "uint32", "minimum": "1", "type": "integer", "location": "query"}}, "id": "orkut.comments.list", "httpMethod": "GET", "path": "activities/{activityId}/comments", "response": {"$ref": "CommentList"}}, "get": {"scopes": ["https://www.googleapis.com/auth/orkut", "https://www.googleapis.com/auth/orkut.readonly"], "parameters": {"commentId": {"required": true, "type": "string", "location": "path"}, "hl": {"type": "string", "location": "query"}}, "id": "orkut.comments.get", "httpMethod": "GET", "path": "comments/{commentId}", "response": {"$ref": "Comment"}}}}', true));
$this->acl = new AclServiceResource($this, $this->serviceName, 'acl', json_decode('{"methods": {"delete": {"scopes": ["https://www.googleapis.com/auth/orkut"], "parameters": {"activityId": {"required": true, "type": "string", "location": "path"}, "userId": {"required": true, "type": "string", "location": "path"}}, "httpMethod": "DELETE", "path": "activities/{activityId}/acl/{userId}", "id": "orkut.acl.delete"}}}', true));
$this->scraps = new ScrapsServiceResource($this, $this->serviceName, 'scraps', json_decode('{"methods": {"insert": {"scopes": ["https://www.googleapis.com/auth/orkut"], "request": {"$ref": "Activity"}, "response": {"$ref": "Activity"}, "httpMethod": "POST", "path": "activities/scraps", "id": "orkut.scraps.insert"}}}', true));
$this->activityVisibility = new ActivityVisibilityServiceResource($this, $this->serviceName, 'activityVisibility', json_decode('{"methods": {"get": {"scopes": ["https://www.googleapis.com/auth/orkut", "https://www.googleapis.com/auth/orkut.readonly"], "parameters": {"activityId": {"required": true, "type": "string", "location": "path"}}, "id": "orkut.activityVisibility.get", "httpMethod": "GET", "path": "activities/{activityId}/visibility", "response": {"$ref": "Visibility"}}, "update": {"scopes": ["https://www.googleapis.com/auth/orkut"], "parameters": {"activityId": {"required": true, "type": "string", "location": "path"}}, "request": {"$ref": "Visibility"}, "id": "orkut.activityVisibility.update", "httpMethod": "PUT", "path": "activities/{activityId}/visibility", "response": {"$ref": "Visibility"}}, "patch": {"scopes": ["https://www.googleapis.com/auth/orkut"], "parameters": {"activityId": {"required": true, "type": "string", "location": "path"}}, "request": {"$ref": "Visibility"}, "id": "orkut.activityVisibility.patch", "httpMethod": "PATCH", "path": "activities/{activityId}/visibility", "response": {"$ref": "Visibility"}}}}', true));
$this->badges = new BadgesServiceResource($this, $this->serviceName, 'badges', json_decode('{"methods": {"list": {"scopes": ["https://www.googleapis.com/auth/orkut", "https://www.googleapis.com/auth/orkut.readonly"], "parameters": {"userId": {"required": true, "type": "string", "location": "path"}}, "id": "orkut.badges.list", "httpMethod": "GET", "path": "people/{userId}/badges", "response": {"$ref": "BadgeList"}}, "get": {"scopes": ["https://www.googleapis.com/auth/orkut", "https://www.googleapis.com/auth/orkut.readonly"], "parameters": {"userId": {"required": true, "type": "string", "location": "path"}, "badgeId": {"format": "int64", "required": true, "type": "string", "location": "path"}}, "id": "orkut.badges.get", "httpMethod": "GET", "path": "people/{userId}/badges/{badgeId}", "response": {"$ref": "Badge"}}}}', true));
$this->counters = new CountersServiceResource($this, $this->serviceName, 'counters', json_decode('{"methods": {"list": {"scopes": ["https://www.googleapis.com/auth/orkut", "https://www.googleapis.com/auth/orkut.readonly"], "parameters": {"userId": {"required": true, "type": "string", "location": "path"}}, "id": "orkut.counters.list", "httpMethod": "GET", "path": "people/{userId}/counters", "response": {"$ref": "Counters"}}}}', true));
}
示例10: __construct
/**
* Constructs the internal representation of the Translate service.
*
* @param apiClient apiClient
*/
public function __construct(apiClient $apiClient)
{
$this->rpcPath = '/rpc';
$this->restBasePath = '/language/translate/';
$this->version = 'v2';
$this->serviceName = 'translate';
$this->io = $apiClient->getIo();
$apiClient->addService($this->serviceName, $this->version);
$this->languages = new LanguagesServiceResource($this, $this->serviceName, 'languages', json_decode('{"methods": {"list": {"parameters": {"target": {"type": "string", "location": "query"}}, "id": "language.languages.list", "httpMethod": "GET", "path": "v2/languages", "response": {"$ref": "LanguagesListResponse"}}}}', true));
$this->detections = new DetectionsServiceResource($this, $this->serviceName, 'detections', json_decode('{"methods": {"list": {"parameters": {"q": {"repeated": true, "required": true, "type": "string", "location": "query"}}, "id": "language.detections.list", "httpMethod": "GET", "path": "v2/detect", "response": {"$ref": "DetectionsListResponse"}}}}', true));
$this->translations = new TranslationsServiceResource($this, $this->serviceName, 'translations', json_decode('{"methods": {"list": {"parameters": {"q": {"repeated": true, "required": true, "type": "string", "location": "query"}, "source": {"type": "string", "location": "query"}, "cid": {"repeated": true, "type": "string", "location": "query"}, "target": {"required": true, "type": "string", "location": "query"}, "format": {"enum": ["html", "text"], "type": "string", "location": "query"}}, "id": "language.translations.list", "httpMethod": "GET", "path": "v2", "response": {"$ref": "TranslationsListResponse"}}}}', true));
}
示例11: __construct
/**
* Constructs the internal representation of the Calendar service.
*
* @param apiClient apiClient
*/
public function __construct(apiClient $apiClient)
{
$this->rpcPath = '/rpc';
$this->restBasePath = '/calendar/v3/';
$this->version = 'v3';
$this->serviceName = 'calendar';
$this->io = $apiClient->getIo();
$apiClient->addService($this->serviceName, $this->version);
$this->freebusy = new FreebusyServiceResource($this, $this->serviceName, 'freebusy', json_decode('{"methods": {"query": {"scopes": ["https://www.googleapis.com/auth/calendar", "https://www.googleapis.com/auth/calendar.readonly"], "request": {"$ref": "FreeBusyRequest"}, "response": {"$ref": "FreeBusyResponse"}, "httpMethod": "POST", "path": "freeBusy", "id": "calendar.freebusy.query"}}}', true));
$this->settings = new SettingsServiceResource($this, $this->serviceName, 'settings', json_decode('{"methods": {"list": {"scopes": ["https://www.googleapis.com/auth/calendar", "https://www.googleapis.com/auth/calendar.readonly"], "id": "calendar.settings.list", "httpMethod": "GET", "path": "users/me/settings", "response": {"$ref": "Settings"}}, "get": {"scopes": ["https://www.googleapis.com/auth/calendar", "https://www.googleapis.com/auth/calendar.readonly"], "parameters": {"setting": {"required": true, "type": "string", "location": "path"}}, "id": "calendar.settings.get", "httpMethod": "GET", "path": "users/me/settings/{setting}", "response": {"$ref": "Setting"}}}}', true));
$this->calendarList = new CalendarListServiceResource($this, $this->serviceName, 'calendarList', json_decode('{"methods": {"insert": {"scopes": ["https://www.googleapis.com/auth/calendar"], "request": {"$ref": "CalendarListEntry"}, "response": {"$ref": "CalendarListEntry"}, "httpMethod": "POST", "path": "users/me/calendarList", "id": "calendar.calendarList.insert"}, "get": {"scopes": ["https://www.googleapis.com/auth/calendar", "https://www.googleapis.com/auth/calendar.readonly"], "parameters": {"calendarId": {"required": true, "type": "string", "location": "path"}}, "id": "calendar.calendarList.get", "httpMethod": "GET", "path": "users/me/calendarList/{calendarId}", "response": {"$ref": "CalendarListEntry"}}, "list": {"scopes": ["https://www.googleapis.com/auth/calendar", "https://www.googleapis.com/auth/calendar.readonly"], "parameters": {"pageToken": {"type": "string", "location": "query"}, "showHidden": {"type": "boolean", "location": "query"}, "maxResults": {"format": "int32", "minimum": "1", "type": "integer", "location": "query"}, "minAccessRole": {"enum": ["freeBusyReader", "owner", "reader", "writer"], "type": "string", "location": "query"}}, "response": {"$ref": "CalendarList"}, "httpMethod": "GET", "path": "users/me/calendarList", "id": "calendar.calendarList.list"}, "update": {"scopes": ["https://www.googleapis.com/auth/calendar"], "parameters": {"calendarId": {"required": true, "type": "string", "location": "path"}}, "request": {"$ref": "CalendarListEntry"}, "id": "calendar.calendarList.update", "httpMethod": "PUT", "path": "users/me/calendarList/{calendarId}", "response": {"$ref": "CalendarListEntry"}}, "patch": {"scopes": ["https://www.googleapis.com/auth/calendar"], "parameters": {"calendarId": {"required": true, "type": "string", "location": "path"}}, "request": {"$ref": "CalendarListEntry"}, "id": "calendar.calendarList.patch", "httpMethod": "PATCH", "path": "users/me/calendarList/{calendarId}", "response": {"$ref": "CalendarListEntry"}}, "delete": {"scopes": ["https://www.googleapis.com/auth/calendar"], "parameters": {"calendarId": {"required": true, "type": "string", "location": "path"}}, "httpMethod": "DELETE", "path": "users/me/calendarList/{calendarId}", "id": "calendar.calendarList.delete"}}}', true));
$this->calendars = new CalendarsServiceResource($this, $this->serviceName, 'calendars', json_decode('{"methods": {"insert": {"scopes": ["https://www.googleapis.com/auth/calendar"], "request": {"$ref": "Calendar"}, "response": {"$ref": "Calendar"}, "httpMethod": "POST", "path": "calendars", "id": "calendar.calendars.insert"}, "get": {"scopes": ["https://www.googleapis.com/auth/calendar", "https://www.googleapis.com/auth/calendar.readonly"], "parameters": {"calendarId": {"required": true, "type": "string", "location": "path"}}, "id": "calendar.calendars.get", "httpMethod": "GET", "path": "calendars/{calendarId}", "response": {"$ref": "Calendar"}}, "clear": {"scopes": ["https://www.googleapis.com/auth/calendar"], "parameters": {"calendarId": {"required": true, "type": "string", "location": "path"}}, "httpMethod": "POST", "path": "calendars/{calendarId}/clear", "id": "calendar.calendars.clear"}, "update": {"scopes": ["https://www.googleapis.com/auth/calendar"], "parameters": {"calendarId": {"required": true, "type": "string", "location": "path"}}, "request": {"$ref": "Calendar"}, "id": "calendar.calendars.update", "httpMethod": "PUT", "path": "calendars/{calendarId}", "response": {"$ref": "Calendar"}}, "patch": {"scopes": ["https://www.googleapis.com/auth/calendar"], "parameters": {"calendarId": {"required": true, "type": "string", "location": "path"}}, "request": {"$ref": "Calendar"}, "id": "calendar.calendars.patch", "httpMethod": "PATCH", "path": "calendars/{calendarId}", "response": {"$ref": "Calendar"}}, "delete": {"scopes": ["https://www.googleapis.com/auth/calendar"], "parameters": {"calendarId": {"required": true, "type": "string", "location": "path"}}, "httpMethod": "DELETE", "path": "calendars/{calendarId}", "id": "calendar.calendars.delete"}}}', true));
$this->acl = new AclServiceResource($this, $this->serviceName, 'acl', json_decode('{"methods": {"insert": {"scopes": ["https://www.googleapis.com/auth/calendar"], "parameters": {"calendarId": {"required": true, "type": "string", "location": "path"}}, "request": {"$ref": "AclRule"}, "id": "calendar.acl.insert", "httpMethod": "POST", "path": "calendars/{calendarId}/acl", "response": {"$ref": "AclRule"}}, "get": {"scopes": ["https://www.googleapis.com/auth/calendar", "https://www.googleapis.com/auth/calendar.readonly"], "parameters": {"calendarId": {"required": true, "type": "string", "location": "path"}, "ruleId": {"required": true, "type": "string", "location": "path"}}, "id": "calendar.acl.get", "httpMethod": "GET", "path": "calendars/{calendarId}/acl/{ruleId}", "response": {"$ref": "AclRule"}}, "list": {"scopes": ["https://www.googleapis.com/auth/calendar", "https://www.googleapis.com/auth/calendar.readonly"], "parameters": {"calendarId": {"required": true, "type": "string", "location": "path"}}, "id": "calendar.acl.list", "httpMethod": "GET", "path": "calendars/{calendarId}/acl", "response": {"$ref": "Acl"}}, "update": {"scopes": ["https://www.googleapis.com/auth/calendar"], "parameters": {"calendarId": {"required": true, "type": "string", "location": "path"}, "ruleId": {"required": true, "type": "string", "location": "path"}}, "request": {"$ref": "AclRule"}, "id": "calendar.acl.update", "httpMethod": "PUT", "path": "calendars/{calendarId}/acl/{ruleId}", "response": {"$ref": "AclRule"}}, "patch": {"scopes": ["https://www.googleapis.com/auth/calendar"], "parameters": {"calendarId": {"required": true, "type": "string", "location": "path"}, "ruleId": {"required": true, "type": "string", "location": "path"}}, "request": {"$ref": "AclRule"}, "id": "calendar.acl.patch", "httpMethod": "PATCH", "path": "calendars/{calendarId}/acl/{ruleId}", "response": {"$ref": "AclRule"}}, "delete": {"scopes": ["https://www.googleapis.com/auth/calendar"], "parameters": {"calendarId": {"required": true, "type": "string", "location": "path"}, "ruleId": {"required": true, "type": "string", "location": "path"}}, "httpMethod": "DELETE", "path": "calendars/{calendarId}/acl/{ruleId}", "id": "calendar.acl.delete"}}}', true));
$this->colors = new ColorsServiceResource($this, $this->serviceName, 'colors', json_decode('{"methods": {"get": {"id": "calendar.colors.get", "path": "colors", "httpMethod": "GET", "response": {"$ref": "Colors"}}}}', true));
$this->events = new EventsServiceResource($this, $this->serviceName, 'events', json_decode('{"methods": {"reset": {"scopes": ["https://www.googleapis.com/auth/calendar"], "parameters": {"eventId": {"required": true, "type": "string", "location": "path"}, "calendarId": {"required": true, "type": "string", "location": "path"}, "sendNotifications": {"type": "boolean", "location": "query"}}, "id": "calendar.events.reset", "httpMethod": "POST", "path": "calendars/{calendarId}/events/{eventId}/reset", "response": {"$ref": "Event"}}, "insert": {"scopes": ["https://www.googleapis.com/auth/calendar"], "parameters": {"calendarId": {"required": true, "type": "string", "location": "path"}, "sendNotifications": {"type": "boolean", "location": "query"}}, "request": {"$ref": "Event"}, "id": "calendar.events.insert", "httpMethod": "POST", "path": "calendars/{calendarId}/events", "response": {"$ref": "Event"}}, "get": {"scopes": ["https://www.googleapis.com/auth/calendar", "https://www.googleapis.com/auth/calendar.readonly"], "parameters": {"eventId": {"required": true, "type": "string", "location": "path"}, "timeZone": {"type": "string", "location": "query"}, "calendarId": {"required": true, "type": "string", "location": "path"}, "maxAttendees": {"format": "int32", "minimum": "1", "type": "integer", "location": "query"}}, "id": "calendar.events.get", "httpMethod": "GET", "path": "calendars/{calendarId}/events/{eventId}", "response": {"$ref": "Event"}}, "move": {"scopes": ["https://www.googleapis.com/auth/calendar"], "parameters": {"eventId": {"required": true, "type": "string", "location": "path"}, "calendarId": {"required": true, "type": "string", "location": "path"}, "destination": {"required": true, "type": "string", "location": "query"}, "sendNotifications": {"type": "boolean", "location": "query"}}, "id": "calendar.events.move", "httpMethod": "POST", "path": "calendars/{calendarId}/events/{eventId}/move", "response": {"$ref": "Event"}}, "list": {"scopes": ["https://www.googleapis.com/auth/calendar", "https://www.googleapis.com/auth/calendar.readonly"], "parameters": {"orderBy": {"enum": ["startTime", "updated"], "type": "string", "location": "query"}, "showHiddenInvitations": {"type": "boolean", "location": "query"}, "pageToken": {"type": "string", "location": "query"}, "iCalUID": {"type": "string", "location": "query"}, "updatedMin": {"type": "string", "location": "query"}, "singleEvents": {"type": "boolean", "location": "query"}, "maxResults": {"format": "int32", "minimum": "1", "type": "integer", "location": "query"}, "q": {"type": "string", "location": "query"}, "showDeleted": {"type": "boolean", "location": "query"}, "calendarId": {"required": true, "type": "string", "location": "path"}, "timeMin": {"type": "string", "location": "query"}, "timeZone": {"type": "string", "location": "query"}, "timeMax": {"type": "string", "location": "query"}, "maxAttendees": {"format": "int32", "minimum": "1", "type": "integer", "location": "query"}}, "id": "calendar.events.list", "httpMethod": "GET", "path": "calendars/{calendarId}/events", "response": {"$ref": "Events"}}, "update": {"scopes": ["https://www.googleapis.com/auth/calendar"], "parameters": {"eventId": {"required": true, "type": "string", "location": "path"}, "calendarId": {"required": true, "type": "string", "location": "path"}, "sendNotifications": {"type": "boolean", "location": "query"}}, "request": {"$ref": "Event"}, "id": "calendar.events.update", "httpMethod": "PUT", "path": "calendars/{calendarId}/events/{eventId}", "response": {"$ref": "Event"}}, "patch": {"scopes": ["https://www.googleapis.com/auth/calendar"], "parameters": {"eventId": {"required": true, "type": "string", "location": "path"}, "calendarId": {"required": true, "type": "string", "location": "path"}, "sendNotifications": {"type": "boolean", "location": "query"}}, "request": {"$ref": "Event"}, "id": "calendar.events.patch", "httpMethod": "PATCH", "path": "calendars/{calendarId}/events/{eventId}", "response": {"$ref": "Event"}}, "instances": {"scopes": ["https://www.googleapis.com/auth/calendar", "https://www.googleapis.com/auth/calendar.readonly"], "parameters": {"eventId": {"required": true, "type": "string", "location": "path"}, "pageToken": {"type": "string", "location": "query"}, "maxResults": {"format": "int32", "minimum": "1", "type": "integer", "location": "query"}, "showDeleted": {"type": "boolean", "location": "query"}, "calendarId": {"required": true, "type": "string", "location": "path"}, "timeZone": {"type": "string", "location": "query"}, "originalStart": {"type": "string", "location": "query"}, "maxAttendees": {"format": "int32", "minimum": "1", "type": "integer", "location": "query"}}, "id": "calendar.events.instances", "httpMethod": "GET", "path": "calendars/{calendarId}/events/{eventId}/instances", "response": {"$ref": "Events"}}, "import": {"scopes": ["https://www.googleapis.com/auth/calendar"], "parameters": {"calendarId": {"required": true, "type": "string", "location": "path"}}, "request": {"$ref": "Event"}, "id": "calendar.events.import", "httpMethod": "POST", "path": "calendars/{calendarId}/events/import", "response": {"$ref": "Event"}}, "quickAdd": {"scopes": ["https://www.googleapis.com/auth/calendar"], "parameters": {"text": {"required": true, "type": "string", "location": "query"}, "calendarId": {"required": true, "type": "string", "location": "path"}, "sendNotifications": {"type": "boolean", "location": "query"}}, "id": "calendar.events.quickAdd", "httpMethod": "POST", "path": "calendars/{calendarId}/events/quickAdd", "response": {"$ref": "Event"}}, "delete": {"scopes": ["https://www.googleapis.com/auth/calendar"], "parameters": {"eventId": {"required": true, "type": "string", "location": "path"}, "calendarId": {"required": true, "type": "string", "location": "path"}, "sendNotifications": {"type": "boolean", "location": "query"}}, "httpMethod": "DELETE", "path": "calendars/{calendarId}/events/{eventId}", "id": "calendar.events.delete"}}}', true));
}
示例12: __construct
/**
* Constructs the internal representation of the Plus service.
*
* @param apiClient apiClient
*/
public function __construct(apiClient $apiClient)
{
$this->rpcPath = '/rpc';
$this->restBasePath = '/plus/v1/';
$this->version = 'v1';
$this->serviceName = 'plus';
$this->io = $apiClient->getIo();
$apiClient->addService($this->serviceName, $this->version);
$this->activities = new ActivitiesServiceResource($this, $this->serviceName, 'activities', json_decode('{"methods": {"search": {"scopes": ["https://www.googleapis.com/auth/plus.me"], "parameters": {"orderBy": {"default": "recent", "enum": ["best", "recent"], "location": "query", "type": "string"}, "pageToken": {"type": "string", "location": "query"}, "language": {"default": "", "type": "string", "location": "query"}, "maxResults": {"format": "uint32", "default": "10", "maximum": "20", "minimum": "1", "location": "query", "type": "integer"}, "query": {"required": true, "type": "string", "location": "query"}}, "id": "plus.activities.search", "httpMethod": "GET", "path": "activities", "response": {"$ref": "ActivityFeed"}}, "list": {"scopes": ["https://www.googleapis.com/auth/plus.me"], "parameters": {"pageToken": {"type": "string", "location": "query"}, "alt": {"default": "json", "enum": ["json"], "location": "query", "type": "string"}, "userId": {"pattern": "me|[0-9]+", "required": true, "type": "string", "location": "path"}, "collection": {"required": true, "enum": ["public"], "location": "path", "type": "string"}, "maxResults": {"format": "uint32", "default": "20", "maximum": "100", "minimum": "1", "location": "query", "type": "integer"}}, "id": "plus.activities.list", "httpMethod": "GET", "path": "people/{userId}/activities/{collection}", "response": {"$ref": "ActivityFeed"}}, "get": {"scopes": ["https://www.googleapis.com/auth/plus.me"], "parameters": {"activityId": {"required": true, "type": "string", "location": "path"}, "alt": {"default": "json", "enum": ["json"], "location": "query", "type": "string"}}, "id": "plus.activities.get", "httpMethod": "GET", "path": "activities/{activityId}", "response": {"$ref": "Activity"}}}}', true));
$this->comments = new CommentsServiceResource($this, $this->serviceName, 'comments', json_decode('{"methods": {"list": {"scopes": ["https://www.googleapis.com/auth/plus.me"], "parameters": {"pageToken": {"type": "string", "location": "query"}, "activityId": {"required": true, "type": "string", "location": "path"}, "alt": {"default": "json", "enum": ["json"], "location": "query", "type": "string"}, "maxResults": {"format": "uint32", "default": "20", "maximum": "100", "minimum": "0", "location": "query", "type": "integer"}}, "id": "plus.comments.list", "httpMethod": "GET", "path": "activities/{activityId}/comments", "response": {"$ref": "CommentFeed"}}, "get": {"scopes": ["https://www.googleapis.com/auth/plus.me"], "parameters": {"commentId": {"required": true, "type": "string", "location": "path"}}, "id": "plus.comments.get", "httpMethod": "GET", "path": "comments/{commentId}", "response": {"$ref": "Comment"}}}}', true));
$this->people = new PeopleServiceResource($this, $this->serviceName, 'people', json_decode('{"methods": {"listByActivity": {"scopes": ["https://www.googleapis.com/auth/plus.me"], "parameters": {"pageToken": {"type": "string", "location": "query"}, "activityId": {"required": true, "type": "string", "location": "path"}, "collection": {"required": true, "enum": ["plusoners", "resharers"], "location": "path", "type": "string"}, "maxResults": {"format": "uint32", "default": "20", "maximum": "100", "minimum": "1", "location": "query", "type": "integer"}}, "id": "plus.people.listByActivity", "httpMethod": "GET", "path": "activities/{activityId}/people/{collection}", "response": {"$ref": "PeopleFeed"}}, "search": {"scopes": ["https://www.googleapis.com/auth/plus.me"], "parameters": {"pageToken": {"type": "string", "location": "query"}, "language": {"default": "", "type": "string", "location": "query"}, "maxResults": {"format": "uint32", "default": "10", "maximum": "20", "minimum": "1", "location": "query", "type": "integer"}, "query": {"required": true, "type": "string", "location": "query"}}, "id": "plus.people.search", "httpMethod": "GET", "path": "people", "response": {"$ref": "PeopleFeed"}}, "get": {"scopes": ["https://www.googleapis.com/auth/plus.me"], "parameters": {"userId": {"pattern": "me|[0-9]+", "required": true, "type": "string", "location": "path"}}, "id": "plus.people.get", "httpMethod": "GET", "path": "people/{userId}", "response": {"$ref": "Person"}}}}', true));
}
示例13: __construct
/**
* Constructs the internal representation of the Adsense service.
*
* @param apiClient apiClient
*/
public function __construct(apiClient $apiClient)
{
$this->rpcPath = '/rpc';
$this->restBasePath = '/adsense/v1/';
$this->version = 'v1';
$this->serviceName = 'adsense';
$this->io = $apiClient->getIo();
$apiClient->addService($this->serviceName, $this->version);
$this->urlchannels = new UrlchannelsServiceResource($this, $this->serviceName, 'urlchannels', json_decode('{"methods": {"list": {"scopes": ["https://www.googleapis.com/auth/adsense", "https://www.googleapis.com/auth/adsense.readonly"], "parameters": {"pageToken": {"type": "string", "location": "query"}, "adClientId": {"required": true, "type": "string", "location": "path"}, "maxResults": {"format": "int32", "maximum": "10000", "minimum": "0", "location": "query", "type": "integer"}}, "id": "adsense.urlchannels.list", "httpMethod": "GET", "path": "adclients/{adClientId}/urlchannels", "response": {"$ref": "UrlChannels"}}}}', true));
$this->adunits = new AdunitsServiceResource($this, $this->serviceName, 'adunits', json_decode('{"methods": {"list": {"scopes": ["https://www.googleapis.com/auth/adsense", "https://www.googleapis.com/auth/adsense.readonly"], "parameters": {"includeInactive": {"type": "boolean", "location": "query"}, "pageToken": {"type": "string", "location": "query"}, "adClientId": {"required": true, "type": "string", "location": "path"}, "maxResults": {"format": "int32", "maximum": "10000", "minimum": "0", "location": "query", "type": "integer"}}, "id": "adsense.adunits.list", "httpMethod": "GET", "path": "adclients/{adClientId}/adunits", "response": {"$ref": "AdUnits"}}}}', true));
$this->adclients = new AdclientsServiceResource($this, $this->serviceName, 'adclients', json_decode('{"methods": {"list": {"scopes": ["https://www.googleapis.com/auth/adsense", "https://www.googleapis.com/auth/adsense.readonly"], "parameters": {"pageToken": {"type": "string", "location": "query"}, "maxResults": {"format": "int32", "maximum": "10000", "minimum": "0", "location": "query", "type": "integer"}}, "response": {"$ref": "AdClients"}, "httpMethod": "GET", "path": "adclients", "id": "adsense.adclients.list"}}}', true));
$this->reports = new ReportsServiceResource($this, $this->serviceName, 'reports', json_decode('{"methods": {"generate": {"scopes": ["https://www.googleapis.com/auth/adsense", "https://www.googleapis.com/auth/adsense.readonly"], "parameters": {"sort": {"pattern": "(\\+|-)?[a-zA-Z_]+", "repeated": true, "type": "string", "location": "query"}, "startDate": {"pattern": "\\d{4}-\\d{2}-\\d{2}", "required": true, "type": "string", "location": "query"}, "endDate": {"pattern": "\\d{4}-\\d{2}-\\d{2}", "required": true, "type": "string", "location": "query"}, "locale": {"pattern": "[a-zA-Z_]+", "type": "string", "location": "query"}, "metric": {"pattern": "[a-zA-Z_]+", "repeated": true, "type": "string", "location": "query"}, "maxResults": {"format": "int32", "maximum": "50000", "minimum": "0", "location": "query", "type": "integer"}, "filter": {"pattern": "[a-zA-Z_]+(==|=@).+", "repeated": true, "type": "string", "location": "query"}, "currency": {"pattern": "[a-zA-Z]+", "type": "string", "location": "query"}, "startIndex": {"format": "int32", "maximum": "5000", "minimum": "0", "location": "query", "type": "integer"}, "dimension": {"pattern": "[a-zA-Z_]+", "repeated": true, "type": "string", "location": "query"}}, "id": "adsense.reports.generate", "httpMethod": "GET", "path": "reports", "response": {"$ref": "AdsenseReportsGenerateResponse"}}}}', true));
$this->customchannels = new CustomchannelsServiceResource($this, $this->serviceName, 'customchannels', json_decode('{"methods": {"list": {"scopes": ["https://www.googleapis.com/auth/adsense", "https://www.googleapis.com/auth/adsense.readonly"], "parameters": {"pageToken": {"type": "string", "location": "query"}, "adClientId": {"required": true, "type": "string", "location": "path"}, "maxResults": {"format": "int32", "maximum": "10000", "minimum": "0", "location": "query", "type": "integer"}}, "id": "adsense.customchannels.list", "httpMethod": "GET", "path": "adclients/{adClientId}/customchannels", "response": {"$ref": "CustomChannels"}}}}', true));
}
示例14: __construct
/**
* Constructs the internal representation of the Tasks service.
*
* @param apiClient apiClient
*/
public function __construct(apiClient $apiClient)
{
$this->rpcPath = '/rpc';
$this->restBasePath = '/tasks/v1/';
$this->version = 'v1';
$this->serviceName = 'tasks';
$this->io = $apiClient->getIo();
$apiClient->addService($this->serviceName, $this->version);
$this->tasks = new TasksServiceResource($this, $this->serviceName, 'tasks', json_decode('{"methods": {"insert": {"scopes": ["https://www.googleapis.com/auth/tasks"], "parameters": {"tasklist": {"required": true, "type": "string", "location": "path"}, "parent": {"type": "string", "location": "query"}, "previous": {"type": "string", "location": "query"}}, "request": {"$ref": "Task"}, "id": "tasks.tasks.insert", "httpMethod": "POST", "path": "lists/{tasklist}/tasks", "response": {"$ref": "Task"}}, "get": {"scopes": ["https://www.googleapis.com/auth/tasks", "https://www.googleapis.com/auth/tasks.readonly"], "parameters": {"tasklist": {"required": true, "type": "string", "location": "path"}, "task": {"required": true, "type": "string", "location": "path"}}, "id": "tasks.tasks.get", "httpMethod": "GET", "path": "lists/{tasklist}/tasks/{task}", "response": {"$ref": "Task"}}, "clear": {"scopes": ["https://www.googleapis.com/auth/tasks"], "parameters": {"tasklist": {"required": true, "type": "string", "location": "path"}}, "httpMethod": "POST", "path": "lists/{tasklist}/clear", "id": "tasks.tasks.clear"}, "move": {"scopes": ["https://www.googleapis.com/auth/tasks"], "parameters": {"previous": {"type": "string", "location": "query"}, "tasklist": {"required": true, "type": "string", "location": "path"}, "parent": {"type": "string", "location": "query"}, "task": {"required": true, "type": "string", "location": "path"}}, "id": "tasks.tasks.move", "httpMethod": "POST", "path": "lists/{tasklist}/tasks/{task}/move", "response": {"$ref": "Task"}}, "list": {"scopes": ["https://www.googleapis.com/auth/tasks", "https://www.googleapis.com/auth/tasks.readonly"], "parameters": {"dueMax": {"type": "string", "location": "query"}, "tasklist": {"required": true, "type": "string", "location": "path"}, "pageToken": {"type": "string", "location": "query"}, "updatedMin": {"type": "string", "location": "query"}, "completedMin": {"type": "string", "location": "query"}, "maxResults": {"format": "int64", "type": "string", "location": "query"}, "showCompleted": {"type": "boolean", "location": "query"}, "showDeleted": {"type": "boolean", "location": "query"}, "completedMax": {"type": "string", "location": "query"}, "showHidden": {"type": "boolean", "location": "query"}, "dueMin": {"type": "string", "location": "query"}}, "id": "tasks.tasks.list", "httpMethod": "GET", "path": "lists/{tasklist}/tasks", "response": {"$ref": "Tasks"}}, "update": {"scopes": ["https://www.googleapis.com/auth/tasks"], "parameters": {"tasklist": {"required": true, "type": "string", "location": "path"}, "task": {"required": true, "type": "string", "location": "path"}}, "request": {"$ref": "Task"}, "id": "tasks.tasks.update", "httpMethod": "PUT", "path": "lists/{tasklist}/tasks/{task}", "response": {"$ref": "Task"}}, "patch": {"scopes": ["https://www.googleapis.com/auth/tasks"], "parameters": {"tasklist": {"required": true, "type": "string", "location": "path"}, "task": {"required": true, "type": "string", "location": "path"}}, "request": {"$ref": "Task"}, "id": "tasks.tasks.patch", "httpMethod": "PATCH", "path": "lists/{tasklist}/tasks/{task}", "response": {"$ref": "Task"}}, "delete": {"scopes": ["https://www.googleapis.com/auth/tasks"], "parameters": {"tasklist": {"required": true, "type": "string", "location": "path"}, "task": {"required": true, "type": "string", "location": "path"}}, "httpMethod": "DELETE", "path": "lists/{tasklist}/tasks/{task}", "id": "tasks.tasks.delete"}}}', true));
$this->tasklists = new TasklistsServiceResource($this, $this->serviceName, 'tasklists', json_decode('{"methods": {"insert": {"scopes": ["https://www.googleapis.com/auth/tasks"], "request": {"$ref": "TaskList"}, "response": {"$ref": "TaskList"}, "httpMethod": "POST", "path": "users/@me/lists", "id": "tasks.tasklists.insert"}, "get": {"scopes": ["https://www.googleapis.com/auth/tasks", "https://www.googleapis.com/auth/tasks.readonly"], "parameters": {"tasklist": {"required": true, "type": "string", "location": "path"}}, "id": "tasks.tasklists.get", "httpMethod": "GET", "path": "users/@me/lists/{tasklist}", "response": {"$ref": "TaskList"}}, "list": {"scopes": ["https://www.googleapis.com/auth/tasks", "https://www.googleapis.com/auth/tasks.readonly"], "parameters": {"pageToken": {"type": "string", "location": "query"}, "maxResults": {"format": "int64", "type": "string", "location": "query"}}, "response": {"$ref": "TaskLists"}, "httpMethod": "GET", "path": "users/@me/lists", "id": "tasks.tasklists.list"}, "update": {"scopes": ["https://www.googleapis.com/auth/tasks"], "parameters": {"tasklist": {"required": true, "type": "string", "location": "path"}}, "request": {"$ref": "TaskList"}, "id": "tasks.tasklists.update", "httpMethod": "PUT", "path": "users/@me/lists/{tasklist}", "response": {"$ref": "TaskList"}}, "patch": {"scopes": ["https://www.googleapis.com/auth/tasks"], "parameters": {"tasklist": {"required": true, "type": "string", "location": "path"}}, "request": {"$ref": "TaskList"}, "id": "tasks.tasklists.patch", "httpMethod": "PATCH", "path": "users/@me/lists/{tasklist}", "response": {"$ref": "TaskList"}}, "delete": {"scopes": ["https://www.googleapis.com/auth/tasks"], "parameters": {"tasklist": {"required": true, "type": "string", "location": "path"}}, "httpMethod": "DELETE", "path": "users/@me/lists/{tasklist}", "id": "tasks.tasklists.delete"}}}', true));
}
示例15: __construct
/**
* Constructs the internal representation of the Shopping service.
*
* @param apiClient apiClient
*/
public function __construct(apiClient $apiClient) {
$this->rpcPath = '/rpc';
$this->restBasePath = '/shopping/search/v1/';
$this->version = 'v1';
$this->serviceName = 'shopping';
$this->io = $apiClient->getIo();
$apiClient->addService($this->serviceName, $this->version);
$this->products = new ProductsServiceResource($this, $this->serviceName, 'products', json_decode('{"methods": {"list": {"parameters": {"sayt.useGcsConfig": {"type": "boolean", "location": "query"}, "debug.geocodeResponse": {"type": "boolean", "location": "query"}, "debug.enableLogging": {"type": "boolean", "location": "query"}, "facets.enabled": {"type": "boolean", "location": "query"}, "relatedQueries.useGcsConfig": {"type": "boolean", "location": "query"}, "promotions.enabled": {"type": "boolean", "location": "query"}, "debug.enabled": {"type": "boolean", "location": "query"}, "facets.include": {"type": "string", "location": "query"}, "productFields": {"type": "string", "location": "query"}, "channels": {"type": "string", "location": "query"}, "currency": {"type": "string", "location": "query"}, "startIndex": {"format": "uint32", "type": "integer", "location": "query"}, "facets.discover": {"type": "string", "location": "query"}, "debug.searchResponse": {"type": "boolean", "location": "query"}, "crowdBy": {"type": "string", "location": "query"}, "spelling.enabled": {"type": "boolean", "location": "query"}, "debug.geocodeRequest": {"type": "boolean", "location": "query"}, "source": {"required": true, "type": "string", "location": "path"}, "shelfSpaceAds.useGcsConfig": {"type": "boolean", "location": "query"}, "shelfSpaceAds.enabled": {"type": "boolean", "location": "query"}, "spelling.useGcsConfig": {"type": "boolean", "location": "query"}, "useCase": {"type": "string", "location": "query"}, "location": {"type": "string", "location": "query"}, "taxonomy": {"type": "string", "location": "query"}, "debug.rdcRequest": {"type": "boolean", "location": "query"}, "categories.include": {"type": "string", "location": "query"}, "debug.searchRequest": {"type": "boolean", "location": "query"}, "boostBy": {"type": "string", "location": "query"}, "safe": {"type": "boolean", "location": "query"}, "categories.useGcsConfig": {"type": "boolean", "location": "query"}, "maxResults": {"format": "uint32", "type": "integer", "location": "query"}, "facets.useGcsConfig": {"type": "boolean", "location": "query"}, "categories.enabled": {"type": "boolean", "location": "query"}, "attributeFilter": {"type": "string", "location": "query"}, "sayt.enabled": {"type": "boolean", "location": "query"}, "thumbnails": {"type": "string", "location": "query"}, "language": {"type": "string", "location": "query"}, "redirects.useGcsConfig": {"type": "boolean", "location": "query"}, "rankBy": {"type": "string", "location": "query"}, "restrictBy": {"type": "string", "location": "query"}, "debug.rdcResponse": {"type": "boolean", "location": "query"}, "q": {"type": "string", "location": "query"}, "shelfSpaceAds.maxResults": {"format": "uint32", "type": "integer", "location": "query"}, "redirects.enabled": {"type": "boolean", "location": "query"}, "country": {"type": "string", "location": "query"}, "relatedQueries.enabled": {"type": "boolean", "location": "query"}, "minAvailability": {"enum": ["inStock", "limited", "outOfStock", "unknown"], "type": "string", "location": "query"}, "promotions.useGcsConfig": {"type": "boolean", "location": "query"}}, "id": "shopping.products.list", "httpMethod": "GET", "path": "{source}/products", "response": {"$ref": "Products"}}, "get": {"parameters": {"categories.include": {"type": "string", "location": "query"}, "recommendations.enabled": {"type": "boolean", "location": "query"}, "debug.enableLogging": {"type": "boolean", "location": "query"}, "thumbnails": {"type": "string", "location": "query"}, "recommendations.include": {"type": "string", "location": "query"}, "taxonomy": {"type": "string", "location": "query"}, "productIdType": {"required": true, "type": "string", "location": "path"}, "categories.useGcsConfig": {"type": "boolean", "location": "query"}, "attributeFilter": {"type": "string", "location": "query"}, "debug.enabled": {"type": "boolean", "location": "query"}, "source": {"required": true, "type": "string", "location": "path"}, "categories.enabled": {"type": "boolean", "location": "query"}, "location": {"type": "string", "location": "query"}, "debug.searchRequest": {"type": "boolean", "location": "query"}, "debug.searchResponse": {"type": "boolean", "location": "query"}, "recommendations.useGcsConfig": {"type": "boolean", "location": "query"}, "productFields": {"type": "string", "location": "query"}, "accountId": {"format": "uint32", "required": true, "type": "integer", "location": "path"}, "productId": {"required": true, "type": "string", "location": "path"}}, "id": "shopping.products.get", "httpMethod": "GET", "path": "{source}/products/{accountId}/{productIdType}/{productId}", "response": {"$ref": "Product"}}}}', true));
}