PluginProbe
ManageWP Worker / 3.9.28
ManageWP Worker v3.9.28
4.9.38 4.9.37 4.9.36 4.9.35 4.9.34 3.8.7 3.8.8 3.9.0 3.9.1 3.9.10 3.9.11 3.9.12 3.9.13 3.9.14 3.9.15 3.9.16 3.9.17 3.9.18 3.9.19 3.9.2 3.9.20 3.9.21 3.9.22 3.9.23 3.9.24 All 73 releases
worker / lib / google-api-client / contrib / Google_WebfontsService.php

Google_WebfontsService.php in ManageWP Worker 3.9.28, at lib/google-api-client/contrib/Google_WebfontsService.php

131 lines 3.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /*
3 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
4 * use this file except in compliance with the License. You may obtain a copy of
5 * the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12 * License for the specific language governing permissions and limitations under
13 * the License.
14 */
15
16
17 /**
18 * The "webfonts" collection of methods.
19 * Typical usage is:
20 * <code>
21 * $webfontsService = new Google_WebfontsService(...);
22 * $webfonts = $webfontsService->webfonts;
23 * </code>
24 */
25 class Google_WebfontsServiceResource extends Google_ServiceResource {
26
27
28 /**
29 * Retrieves the list of fonts currently served by the Google Web Fonts Developer API
30 * (webfonts.list)
31 *
32 * @param array $optParams Optional parameters.
33 *
34 * @opt_param string sort Enables sorting of the list
35 * @return Google_WebfontList
36 */
37 public function listWebfonts($optParams = array()) {
38 $params = array();
39 $params = array_merge($params, $optParams);
40 $data = $this->__call('list', array($params));
41 if ($this->useObjects()) {
42 return new Google_WebfontList($data);
43 } else {
44 return $data;
45 }
46 }
47 }
48
49 /**
50 * Service definition for Google_Webfonts (v1).
51 *
52 * <p>
53 * The Google Web Fonts Developer API.
54 * </p>
55 *
56 * <p>
57 * For more information about this service, see the
58 * <a href="http://code.google.com/apis/webfonts/docs/developer_api.html" target="_blank">API Documentation</a>
59 * </p>
60 *
61 * @author Google, Inc.
62 */
63 class Google_WebfontsService extends Google_Service {
64 public $webfonts;
65 /**
66 * Constructs the internal representation of the Webfonts service.
67 *
68 * @param Google_Client $client
69 */
70 public function __construct(Google_Client $client) {
71 $this->servicePath = 'webfonts/v1/';
72 $this->version = 'v1';
73 $this->serviceName = 'webfonts';
74
75 $client->addService($this->serviceName, $this->version);
76 $this->webfonts = new Google_WebfontsServiceResource($this, $this->serviceName, 'webfonts', json_decode('{"methods": {"list": {"httpMethod": "GET", "response": {"$ref": "WebfontList"}, "id": "webfonts.webfonts.list", "parameters": {"sort": {"enum": ["alpha", "date", "popularity", "style", "trending"], "type": "string", "location": "query"}}, "path": "webfonts"}}}', true));
77
78 }
79 }
80
81 class Google_Webfont extends Google_Model {
82 public $kind;
83 public $variants;
84 public $subsets;
85 public $family;
86 public function setKind($kind) {
87 $this->kind = $kind;
88 }
89 public function getKind() {
90 return $this->kind;
91 }
92 public function setVariants($variants) {
93 $this->variants = $variants;
94 }
95 public function getVariants() {
96 return $this->variants;
97 }
98 public function setSubsets($subsets) {
99 $this->subsets = $subsets;
100 }
101 public function getSubsets() {
102 return $this->subsets;
103 }
104 public function setFamily($family) {
105 $this->family = $family;
106 }
107 public function getFamily() {
108 return $this->family;
109 }
110 }
111
112 class Google_WebfontList extends Google_Model {
113 protected $__itemsType = 'Google_Webfont';
114 protected $__itemsDataType = 'array';
115 public $items;
116 public $kind;
117 public function setItems(/* array(Google_Webfont) */ $items) {
118 $this->assertIsArray($items, 'Google_Webfont', __METHOD__);
119 $this->items = $items;
120 }
121 public function getItems() {
122 return $this->items;
123 }
124 public function setKind($kind) {
125 $this->kind = $kind;
126 }
127 public function getKind() {
128 return $this->kind;
129 }
130 }
131