@googleapis/webfonts 1.5.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +43 -0
- package/build/index.d.ts +1 -1
- package/build/index.js.map +1 -1
- package/build/v1.d.ts +58 -3
- package/build/v1.js.map +1 -1
- package/index.ts +0 -1
- package/package.json +2 -2
- package/v1.ts +62 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,48 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [3.0.1](https://github.com/googleapis/google-api-nodejs-client/compare/webfonts-v3.0.0...webfonts-v3.0.1) (2025-07-08)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **webfonts:** update the API ([2686686](https://github.com/googleapis/google-api-nodejs-client/commit/2686686c7148718da05b5c15f5a9d43063656330))
|
|
9
|
+
* **webfonts:** update the API ([9a41576](https://github.com/googleapis/google-api-nodejs-client/commit/9a415763ea0301c559a6df443a34a4f398d8ca79))
|
|
10
|
+
|
|
11
|
+
## [3.0.0](https://github.com/googleapis/google-api-nodejs-client/compare/webfonts-v2.0.1...webfonts-v3.0.0) (2025-06-30)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### ⚠ BREAKING CHANGES
|
|
15
|
+
|
|
16
|
+
* upgrade to node 18
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* upgrade to node 18 ([682fbb8](https://github.com/googleapis/google-api-nodejs-client/commit/682fbb869189ae92b3e9a194d37d0548af0c1f92))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Bug Fixes
|
|
24
|
+
|
|
25
|
+
* **deps:** upgrade googleapis-common to 8.0.2-rc ([f4b0990](https://github.com/googleapis/google-api-nodejs-client/commit/f4b099071040cfbcfe4a2e7d487d45ee93b369e0))
|
|
26
|
+
* **webfonts:** update the API ([9a41576](https://github.com/googleapis/google-api-nodejs-client/commit/9a415763ea0301c559a6df443a34a4f398d8ca79))
|
|
27
|
+
|
|
28
|
+
## [2.0.1](https://github.com/googleapis/google-api-nodejs-client/compare/webfonts-v2.0.0...webfonts-v2.0.1) (2025-06-04)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### Bug Fixes
|
|
32
|
+
|
|
33
|
+
* **deps:** upgrade googleapis-common to 8.0.2-rc ([f4b0990](https://github.com/googleapis/google-api-nodejs-client/commit/f4b099071040cfbcfe4a2e7d487d45ee93b369e0))
|
|
34
|
+
|
|
35
|
+
## [2.0.0](https://github.com/googleapis/google-api-nodejs-client/compare/webfonts-v1.5.0...webfonts-v2.0.0) (2025-05-29)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
### ⚠ BREAKING CHANGES
|
|
39
|
+
|
|
40
|
+
* upgrade to node 18
|
|
41
|
+
|
|
42
|
+
### Features
|
|
43
|
+
|
|
44
|
+
* upgrade to node 18 ([682fbb8](https://github.com/googleapis/google-api-nodejs-client/commit/682fbb869189ae92b3e9a194d37d0548af0c1f92))
|
|
45
|
+
|
|
3
46
|
## [1.5.0](https://github.com/googleapis/google-api-nodejs-client/compare/webfonts-v1.4.0...webfonts-v1.5.0) (2025-02-04)
|
|
4
47
|
|
|
5
48
|
|
package/build/index.d.ts
CHANGED
|
@@ -9,4 +9,4 @@ export declare function webfonts(options: webfonts_v1.Options): webfonts_v1.Webf
|
|
|
9
9
|
declare const auth: AuthPlus;
|
|
10
10
|
export { auth };
|
|
11
11
|
export { webfonts_v1 };
|
|
12
|
-
export { AuthPlus, GlobalOptions, APIRequestContext, GoogleConfigurable, StreamMethodOptions,
|
|
12
|
+
export { AuthPlus, GlobalOptions, APIRequestContext, GoogleConfigurable, StreamMethodOptions, MethodOptions, BodyResponseCallback, } from 'googleapis-common';
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"m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-1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient,
|
|
2
|
+
import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosResponseWithHTTP2, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common';
|
|
3
3
|
import { Readable } from 'stream';
|
|
4
4
|
export declare namespace webfonts_v1 {
|
|
5
5
|
export interface Options extends GlobalOptions {
|
|
@@ -157,14 +157,69 @@ export declare namespace webfonts_v1 {
|
|
|
157
157
|
constructor(context: APIRequestContext);
|
|
158
158
|
/**
|
|
159
159
|
* Retrieves the list of fonts currently served by the Google Fonts Developer API.
|
|
160
|
+
* @example
|
|
161
|
+
* ```js
|
|
162
|
+
* // Before running the sample:
|
|
163
|
+
* // - Enable the API at:
|
|
164
|
+
* // https://console.developers.google.com/apis/api/webfonts.googleapis.com
|
|
165
|
+
* // - Login into gcloud by running:
|
|
166
|
+
* // ```sh
|
|
167
|
+
* // $ gcloud auth application-default login
|
|
168
|
+
* // ```
|
|
169
|
+
* // - Install the npm module by running:
|
|
170
|
+
* // ```sh
|
|
171
|
+
* // $ npm install googleapis
|
|
172
|
+
* // ```
|
|
173
|
+
*
|
|
174
|
+
* const {google} = require('googleapis');
|
|
175
|
+
* const webfonts = google.webfonts('v1');
|
|
176
|
+
*
|
|
177
|
+
* async function main() {
|
|
178
|
+
* const auth = new google.auth.GoogleAuth({
|
|
179
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
180
|
+
* scopes: [],
|
|
181
|
+
* });
|
|
182
|
+
*
|
|
183
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
184
|
+
* const authClient = await auth.getClient();
|
|
185
|
+
* google.options({auth: authClient});
|
|
186
|
+
*
|
|
187
|
+
* // Do the magic
|
|
188
|
+
* const res = await webfonts.webfonts.list({
|
|
189
|
+
* // Controls the font urls in `Webfont.files`, by default, static ttf fonts are sent.
|
|
190
|
+
* capability: 'placeholder-value',
|
|
191
|
+
* // Filters by Webfont.category, if category is found in Webfont.categories. If not set, returns all families.
|
|
192
|
+
* category: 'placeholder-value',
|
|
193
|
+
* // Filters by Webfont.family, using literal match. If not set, returns all families
|
|
194
|
+
* family: 'placeholder-value',
|
|
195
|
+
* // Enables sorting of the list.
|
|
196
|
+
* sort: 'placeholder-value',
|
|
197
|
+
* // Filters by Webfont.subset, if subset is found in Webfont.subsets. If not set, returns all families.
|
|
198
|
+
* subset: 'placeholder-value',
|
|
199
|
+
* });
|
|
200
|
+
* console.log(res.data);
|
|
201
|
+
*
|
|
202
|
+
* // Example response
|
|
203
|
+
* // {
|
|
204
|
+
* // "items": [],
|
|
205
|
+
* // "kind": "my_kind"
|
|
206
|
+
* // }
|
|
207
|
+
* }
|
|
208
|
+
*
|
|
209
|
+
* main().catch(e => {
|
|
210
|
+
* console.error(e);
|
|
211
|
+
* throw e;
|
|
212
|
+
* });
|
|
213
|
+
*
|
|
214
|
+
* ```
|
|
160
215
|
*
|
|
161
216
|
* @param params - Parameters for request
|
|
162
217
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
163
218
|
* @param callback - Optional callback that handles the response.
|
|
164
219
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
165
220
|
*/
|
|
166
|
-
list(params: Params$Resource$Webfonts$List, options: StreamMethodOptions):
|
|
167
|
-
list(params?: Params$Resource$Webfonts$List, options?: MethodOptions):
|
|
221
|
+
list(params: Params$Resource$Webfonts$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
222
|
+
list(params?: Params$Resource$Webfonts$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$WebfontList>>;
|
|
168
223
|
list(params: Params$Resource$Webfonts$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
169
224
|
list(params: Params$Resource$Webfonts$List, options: MethodOptions | BodyResponseCallback<Schema$WebfontList>, callback: BodyResponseCallback<Schema$WebfontList>): void;
|
|
170
225
|
list(params: Params$Resource$Webfonts$List, callback: BodyResponseCallback<Schema$WebfontList>): void;
|
package/build/v1.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v1.js","sourceRoot":"","sources":["../v1.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAEjC,uDAAuD;AACvD,sDAAsD;AACtD,0DAA0D;AAC1D,oDAAoD;AACpD,4CAA4C;AAE5C,yDAe2B;AAG3B,IAAiB,WAAW,
|
|
1
|
+
{"version":3,"file":"v1.js","sourceRoot":"","sources":["../v1.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAEjC,uDAAuD;AACvD,sDAAsD;AACtD,0DAA0D;AAC1D,oDAAoD;AACpD,4CAA4C;AAE5C,yDAe2B;AAG3B,IAAiB,WAAW,CAoV3B;AApVD,WAAiB,WAAW;IAgE1B;;;;;;;;;;OAUG;IACH,MAAa,QAAQ;QAInB,YAAY,OAAsB,EAAE,MAA2B;YAC7D,IAAI,CAAC,OAAO,GAAG;gBACb,QAAQ,EAAE,OAAO,IAAI,EAAE;gBACvB,MAAM;aACP,CAAC;YAEF,IAAI,CAAC,QAAQ,GAAG,IAAI,iBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACtD,CAAC;KACF;IAZY,oBAAQ,WAYpB,CAAA;IAkFD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CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@googleapis/webfonts",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "webfonts",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"webpack": "webpack"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"googleapis-common": "^
|
|
31
|
+
"googleapis-common": "^8.0.2-rc.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@microsoft/api-documenter": "^7.8.10",
|
package/v1.ts
CHANGED
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
Compute,
|
|
24
24
|
UserRefreshClient,
|
|
25
25
|
BaseExternalAccountClient,
|
|
26
|
-
|
|
26
|
+
GaxiosResponseWithHTTP2,
|
|
27
27
|
GoogleConfigurable,
|
|
28
28
|
createAPIRequest,
|
|
29
29
|
MethodOptions,
|
|
@@ -212,6 +212,61 @@ export namespace webfonts_v1 {
|
|
|
212
212
|
|
|
213
213
|
/**
|
|
214
214
|
* Retrieves the list of fonts currently served by the Google Fonts Developer API.
|
|
215
|
+
* @example
|
|
216
|
+
* ```js
|
|
217
|
+
* // Before running the sample:
|
|
218
|
+
* // - Enable the API at:
|
|
219
|
+
* // https://console.developers.google.com/apis/api/webfonts.googleapis.com
|
|
220
|
+
* // - Login into gcloud by running:
|
|
221
|
+
* // ```sh
|
|
222
|
+
* // $ gcloud auth application-default login
|
|
223
|
+
* // ```
|
|
224
|
+
* // - Install the npm module by running:
|
|
225
|
+
* // ```sh
|
|
226
|
+
* // $ npm install googleapis
|
|
227
|
+
* // ```
|
|
228
|
+
*
|
|
229
|
+
* const {google} = require('googleapis');
|
|
230
|
+
* const webfonts = google.webfonts('v1');
|
|
231
|
+
*
|
|
232
|
+
* async function main() {
|
|
233
|
+
* const auth = new google.auth.GoogleAuth({
|
|
234
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
235
|
+
* scopes: [],
|
|
236
|
+
* });
|
|
237
|
+
*
|
|
238
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
239
|
+
* const authClient = await auth.getClient();
|
|
240
|
+
* google.options({auth: authClient});
|
|
241
|
+
*
|
|
242
|
+
* // Do the magic
|
|
243
|
+
* const res = await webfonts.webfonts.list({
|
|
244
|
+
* // Controls the font urls in `Webfont.files`, by default, static ttf fonts are sent.
|
|
245
|
+
* capability: 'placeholder-value',
|
|
246
|
+
* // Filters by Webfont.category, if category is found in Webfont.categories. If not set, returns all families.
|
|
247
|
+
* category: 'placeholder-value',
|
|
248
|
+
* // Filters by Webfont.family, using literal match. If not set, returns all families
|
|
249
|
+
* family: 'placeholder-value',
|
|
250
|
+
* // Enables sorting of the list.
|
|
251
|
+
* sort: 'placeholder-value',
|
|
252
|
+
* // Filters by Webfont.subset, if subset is found in Webfont.subsets. If not set, returns all families.
|
|
253
|
+
* subset: 'placeholder-value',
|
|
254
|
+
* });
|
|
255
|
+
* console.log(res.data);
|
|
256
|
+
*
|
|
257
|
+
* // Example response
|
|
258
|
+
* // {
|
|
259
|
+
* // "items": [],
|
|
260
|
+
* // "kind": "my_kind"
|
|
261
|
+
* // }
|
|
262
|
+
* }
|
|
263
|
+
*
|
|
264
|
+
* main().catch(e => {
|
|
265
|
+
* console.error(e);
|
|
266
|
+
* throw e;
|
|
267
|
+
* });
|
|
268
|
+
*
|
|
269
|
+
* ```
|
|
215
270
|
*
|
|
216
271
|
* @param params - Parameters for request
|
|
217
272
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -221,11 +276,11 @@ export namespace webfonts_v1 {
|
|
|
221
276
|
list(
|
|
222
277
|
params: Params$Resource$Webfonts$List,
|
|
223
278
|
options: StreamMethodOptions
|
|
224
|
-
):
|
|
279
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
225
280
|
list(
|
|
226
281
|
params?: Params$Resource$Webfonts$List,
|
|
227
282
|
options?: MethodOptions
|
|
228
|
-
):
|
|
283
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$WebfontList>>;
|
|
229
284
|
list(
|
|
230
285
|
params: Params$Resource$Webfonts$List,
|
|
231
286
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -254,7 +309,10 @@ export namespace webfonts_v1 {
|
|
|
254
309
|
callback?:
|
|
255
310
|
| BodyResponseCallback<Schema$WebfontList>
|
|
256
311
|
| BodyResponseCallback<Readable>
|
|
257
|
-
):
|
|
312
|
+
):
|
|
313
|
+
| void
|
|
314
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$WebfontList>>
|
|
315
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
258
316
|
let params = (paramsOrCallback || {}) as Params$Resource$Webfonts$List;
|
|
259
317
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
260
318
|
|