Skip to content

Commit 609207d

Browse files
yoshi-automationsofisl
authored andcommitted
feat(webfonts): update the API
#### webfonts:v1 The following keys were added: - resources.webfonts.methods.list.parameters.capability.description - resources.webfonts.methods.list.parameters.capability.enum - resources.webfonts.methods.list.parameters.capability.enumDescriptions - resources.webfonts.methods.list.parameters.capability.location - resources.webfonts.methods.list.parameters.capability.repeated - resources.webfonts.methods.list.parameters.capability.type - resources.webfonts.methods.list.parameters.family.description - resources.webfonts.methods.list.parameters.family.location - resources.webfonts.methods.list.parameters.family.repeated - resources.webfonts.methods.list.parameters.family.type - resources.webfonts.methods.list.parameters.subset.description - resources.webfonts.methods.list.parameters.subset.location - resources.webfonts.methods.list.parameters.subset.type - schemas.Axis.description - schemas.Axis.id - schemas.Axis.properties.end.description - schemas.Axis.properties.end.format - schemas.Axis.properties.end.type - schemas.Axis.properties.start.description - schemas.Axis.properties.start.format - schemas.Axis.properties.start.type - schemas.Axis.properties.tag.description - schemas.Axis.properties.tag.type - schemas.Axis.type - schemas.Webfont.properties.axes.description - schemas.Webfont.properties.axes.items.$ref - schemas.Webfont.properties.axes.type - schemas.Webfont.properties.menu.description - schemas.Webfont.properties.menu.type
1 parent 09e293d commit 609207d

File tree

2 files changed

+103
-1
lines changed

2 files changed

+103
-1
lines changed

discovery/webfonts-v1.json

Lines changed: 60 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,28 @@
104104
"id": "webfonts.webfonts.list",
105105
"parameterOrder": [],
106106
"parameters": {
107+
"capability": {
108+
"description": "Controls the font urls in `Webfont.files`, by default, static ttf fonts are sent.",
109+
"enum": [
110+
"CAPABILITY_UNSPECIFIED",
111+
"WOFF2",
112+
"VF"
113+
],
114+
"enumDescriptions": [
115+
"Default means static ttf fonts.",
116+
"Use WOFF2(Compressed)instead of ttf.",
117+
"Prefer variable font files instead of static fonts instantiated at standard weights."
118+
],
119+
"location": "query",
120+
"repeated": true,
121+
"type": "string"
122+
},
123+
"family": {
124+
"description": "Filters by Webfont.family, using literal match. If not set, returns all families",
125+
"location": "query",
126+
"repeated": true,
127+
"type": "string"
128+
},
107129
"sort": {
108130
"description": "Enables sorting of the list.",
109131
"enum": [
@@ -124,6 +146,11 @@
124146
],
125147
"location": "query",
126148
"type": "string"
149+
},
150+
"subset": {
151+
"description": "Filters by Webfont.subset, if subset is found in Webfont.subsets. If not set, returns all families.",
152+
"location": "query",
153+
"type": "string"
127154
}
128155
},
129156
"path": "v1/webfonts",
@@ -134,13 +161,41 @@
134161
}
135162
}
136163
},
137-
"revision": "20200819",
164+
"revision": "20230419",
138165
"rootUrl": "https://webfonts.googleapis.com/",
139166
"schemas": {
167+
"Axis": {
168+
"description": "Metadata for a variable font axis.",
169+
"id": "Axis",
170+
"properties": {
171+
"end": {
172+
"description": "maximum value",
173+
"format": "float",
174+
"type": "number"
175+
},
176+
"start": {
177+
"description": "minimum value",
178+
"format": "float",
179+
"type": "number"
180+
},
181+
"tag": {
182+
"description": "tag name.",
183+
"type": "string"
184+
}
185+
},
186+
"type": "object"
187+
},
140188
"Webfont": {
141189
"description": "Metadata describing a family of fonts.",
142190
"id": "Webfont",
143191
"properties": {
192+
"axes": {
193+
"description": "Axis for variable fonts.",
194+
"items": {
195+
"$ref": "Axis"
196+
},
197+
"type": "array"
198+
},
144199
"category": {
145200
"description": "The category of the font.",
146201
"type": "string"
@@ -164,6 +219,10 @@
164219
"description": "The date (format \"yyyy-MM-dd\") the font was modified for the last time.",
165220
"type": "string"
166221
},
222+
"menu": {
223+
"description": "Font URL for menu subset, a subset of the font that is enough to display the font name",
224+
"type": "string"
225+
},
167226
"subsets": {
168227
"description": "The scripts supported by the font.",
169228
"items": {

src/apis/webfonts/v1.ts

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,31 @@ export namespace webfonts_v1 {
124124
}
125125
}
126126

127+
/**
128+
* Metadata for a variable font axis.
129+
*/
130+
export interface Schema$Axis {
131+
/**
132+
* maximum value
133+
*/
134+
end?: number | null;
135+
/**
136+
* minimum value
137+
*/
138+
start?: number | null;
139+
/**
140+
* tag name.
141+
*/
142+
tag?: string | null;
143+
}
127144
/**
128145
* Metadata describing a family of fonts.
129146
*/
130147
export interface Schema$Webfont {
148+
/**
149+
* Axis for variable fonts.
150+
*/
151+
axes?: Schema$Axis[];
131152
/**
132153
* The category of the font.
133154
*/
@@ -148,6 +169,10 @@ export namespace webfonts_v1 {
148169
* The date (format "yyyy-MM-dd") the font was modified for the last time.
149170
*/
150171
lastModified?: string | null;
172+
/**
173+
* Font URL for menu subset, a subset of the font that is enough to display the font name
174+
*/
175+
menu?: string | null;
151176
/**
152177
* The scripts supported by the font.
153178
*/
@@ -208,8 +233,14 @@ export namespace webfonts_v1 {
208233
*
209234
* // Do the magic
210235
* const res = await webfonts.webfonts.list({
236+
* // Controls the font urls in `Webfont.files`, by default, static ttf fonts are sent.
237+
* capability: 'placeholder-value',
238+
* // Filters by Webfont.family, using literal match. If not set, returns all families
239+
* family: 'placeholder-value',
211240
* // Enables sorting of the list.
212241
* sort: 'placeholder-value',
242+
* // Filters by Webfont.subset, if subset is found in Webfont.subsets. If not set, returns all families.
243+
* subset: 'placeholder-value',
213244
* });
214245
* console.log(res.data);
215246
*
@@ -309,9 +340,21 @@ export namespace webfonts_v1 {
309340
}
310341

311342
export interface Params$Resource$Webfonts$List extends StandardParameters {
343+
/**
344+
* Controls the font urls in `Webfont.files`, by default, static ttf fonts are sent.
345+
*/
346+
capability?: string[];
347+
/**
348+
* Filters by Webfont.family, using literal match. If not set, returns all families
349+
*/
350+
family?: string[];
312351
/**
313352
* Enables sorting of the list.
314353
*/
315354
sort?: string;
355+
/**
356+
* Filters by Webfont.subset, if subset is found in Webfont.subsets. If not set, returns all families.
357+
*/
358+
subset?: string;
316359
}
317360
}

0 commit comments

Comments
 (0)