本文整理汇总了PHP中apiClient::addService方法的典型用法代码示例。如果您正苦于以下问题:PHP apiClient::addService方法的具体用法?PHP apiClient::addService怎么用?PHP apiClient::addService使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类apiClient
的用法示例。
在下文中一共展示了apiClient::addService方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __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));
}
示例2: __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));
}
示例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));
}
示例4: __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));
}
示例5: __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));
}
示例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 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));
}
示例8: __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));
}
示例9: __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));
}
示例10: __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));
}
示例11: __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));
}
示例12: __construct
/**
* Constructs the internal representation of the Latitude service.
*
* @param apiClient apiClient
*/
public function __construct(apiClient $apiClient)
{
$this->rpcPath = '/rpc';
$this->restBasePath = '/latitude/v1/';
$this->version = 'v1';
$this->serviceName = 'latitude';
$this->io = $apiClient->getIo();
$apiClient->addService($this->serviceName, $this->version);
$this->currentLocation = new CurrentLocationServiceResource($this, $this->serviceName, 'currentLocation', json_decode('{"methods": {"insert": {"scopes": ["https://www.googleapis.com/auth/latitude.all.best", "https://www.googleapis.com/auth/latitude.all.city", "https://www.googleapis.com/auth/latitude.current.best", "https://www.googleapis.com/auth/latitude.current.city"], "request": {"$ref": "LatitudeCurrentlocationResourceJson"}, "response": {"$ref": "LatitudeCurrentlocationResourceJson"}, "httpMethod": "POST", "path": "currentLocation", "id": "latitude.currentLocation.insert"}, "delete": {"id": "latitude.currentLocation.delete", "path": "currentLocation", "httpMethod": "DELETE", "scopes": ["https://www.googleapis.com/auth/latitude.all.best", "https://www.googleapis.com/auth/latitude.all.city", "https://www.googleapis.com/auth/latitude.current.best", "https://www.googleapis.com/auth/latitude.current.city"]}, "get": {"scopes": ["https://www.googleapis.com/auth/latitude.all.best", "https://www.googleapis.com/auth/latitude.all.city", "https://www.googleapis.com/auth/latitude.current.best", "https://www.googleapis.com/auth/latitude.current.city"], "parameters": {"granularity": {"type": "string", "location": "query"}}, "response": {"$ref": "LatitudeCurrentlocationResourceJson"}, "httpMethod": "GET", "path": "currentLocation", "id": "latitude.currentLocation.get"}}}', true));
$this->location = new LocationServiceResource($this, $this->serviceName, 'location', json_decode('{"methods": {"insert": {"scopes": ["https://www.googleapis.com/auth/latitude.all.best", "https://www.googleapis.com/auth/latitude.all.city"], "request": {"$ref": "Location"}, "response": {"$ref": "Location"}, "httpMethod": "POST", "path": "location", "id": "latitude.location.insert"}, "delete": {"scopes": ["https://www.googleapis.com/auth/latitude.all.best", "https://www.googleapis.com/auth/latitude.all.city"], "parameters": {"locationId": {"required": true, "type": "string", "location": "path"}}, "httpMethod": "DELETE", "path": "location/{locationId}", "id": "latitude.location.delete"}, "list": {"scopes": ["https://www.googleapis.com/auth/latitude.all.best", "https://www.googleapis.com/auth/latitude.all.city"], "parameters": {"max-results": {"type": "string", "location": "query"}, "max-time": {"type": "string", "location": "query"}, "min-time": {"type": "string", "location": "query"}, "granularity": {"type": "string", "location": "query"}}, "response": {"$ref": "LocationFeed"}, "httpMethod": "GET", "path": "location", "id": "latitude.location.list"}, "get": {"scopes": ["https://www.googleapis.com/auth/latitude.all.best", "https://www.googleapis.com/auth/latitude.all.city"], "parameters": {"locationId": {"required": true, "type": "string", "location": "path"}, "granularity": {"type": "string", "location": "query"}}, "id": "latitude.location.get", "httpMethod": "GET", "path": "location/{locationId}", "response": {"$ref": "Location"}}}}', true));
}
示例13: __construct
/**
* Constructs the internal representation of the Oauth2 service.
*
* @param apiClient apiClient
*/
public function __construct(apiClient $apiClient)
{
$this->rpcPath = '/rpc';
$this->restBasePath = '/';
$this->version = 'v2';
$this->serviceName = 'oauth2';
$apiClient->addService($this->serviceName, $this->version);
$this->userinfo = new UserinfoServiceResource($this, $this->serviceName, 'userinfo', json_decode('{"methods": {"get": {"path": "oauth2/v2/userinfo", "response": {"$ref": "Userinfo"}, "httpMethod": "GET", "id": "oauth2.userinfo.get"}}}', true));
$this->userinfo_v2 = new UserinfoV2ServiceResource($this, $this->serviceName, 'v2', json_decode('{}', true));
$this->tokeninfo = new TokeninfoServiceResource($this, $this->serviceName, 'tokeninfo', json_decode('{"id": "oauth2.tokeninfo", "path": "oauth2/v2/tokeninfo", "response": {"$ref": "Tokeninfo"}, "parameters": {"access_token": {"type": "string", "location": "query"}, "id_token": {"type": "string", "location": "query"}}, "httpMethod": "GET"}', true));
}
示例14: __construct
/**
* Constructs the internal representation of the Diacritize service.
*
* @param apiClient apiClient
*/
public function __construct(apiClient $apiClient)
{
$this->rpcPath = '/rpc';
$this->restBasePath = '/language/diacritize/';
$this->version = 'v1';
$this->serviceName = 'diacritize';
$this->io = $apiClient->getIo();
$apiClient->addService($this->serviceName, $this->version);
$this->diacritize = new DiacritizeServiceResource($this, $this->serviceName, 'diacritize', json_decode('{"resources": {"corpus": {"methods": {"get": {"parameters": {"lang": {"required": true, "type": "string", "location": "query"}, "message": {"required": true, "type": "string", "location": "query"}, "last_letter": {"required": true, "type": "boolean", "location": "query"}}, "id": "language.diacritize.corpus.get", "httpMethod": "GET", "path": "v1", "response": {"$ref": "LanguageDiacritizeCorpusResource"}}}}}}', true));
}
示例15: __construct
/**
* Constructs the internal representation of the Urlshortener service.
*
* @param apiClient apiClient
*/
public function __construct(apiClient $apiClient)
{
$this->rpcPath = '/rpc';
$this->restBasePath = '/urlshortener/v1/';
$this->version = 'v1';
$this->serviceName = 'urlshortener';
$apiClient->addService($this->serviceName, $this->version);
$this->url = new UrlServiceResource($this, $this->serviceName, 'url', json_decode('{"methods": {"insert": {"scopes": ["https://www.googleapis.com/auth/urlshortener"], "request": {"$ref": "Url"}, "response": {"$ref": "Url"}, "httpMethod": "POST", "path": "url", "id": "urlshortener.url.insert"}, "list": {"scopes": ["https://www.googleapis.com/auth/urlshortener"], "parameters": {"start-token": {"type": "string", "location": "query"}, "projection": {"enum": ["ANALYTICS_CLICKS", "FULL"], "type": "string", "location": "query"}}, "response": {"$ref": "UrlHistory"}, "httpMethod": "GET", "path": "url/history", "id": "urlshortener.url.list"}, "get": {"parameters": {"shortUrl": {"required": true, "type": "string", "location": "query"}, "projection": {"enum": ["ANALYTICS_CLICKS", "ANALYTICS_TOP_STRINGS", "FULL"], "type": "string", "location": "query"}}, "id": "urlshortener.url.get", "httpMethod": "GET", "path": "url", "response": {"$ref": "Url"}}}}', true));
}