Skip to content

Commit a468a4b

Browse files
feat(adsenseplatform): update the API
#### adsenseplatform:v1alpha The following keys were added: - resources.accounts.resources.platforms.resources.groups.methods.patch.description - resources.accounts.resources.platforms.resources.groups.methods.patch.flatPath - resources.accounts.resources.platforms.resources.groups.methods.patch.httpMethod - resources.accounts.resources.platforms.resources.groups.methods.patch.id - resources.accounts.resources.platforms.resources.groups.methods.patch.parameterOrder - resources.accounts.resources.platforms.resources.groups.methods.patch.parameters.name.description - resources.accounts.resources.platforms.resources.groups.methods.patch.parameters.name.location - resources.accounts.resources.platforms.resources.groups.methods.patch.parameters.name.pattern - resources.accounts.resources.platforms.resources.groups.methods.patch.parameters.name.required - resources.accounts.resources.platforms.resources.groups.methods.patch.parameters.name.type - resources.accounts.resources.platforms.resources.groups.methods.patch.parameters.updateMask.description - resources.accounts.resources.platforms.resources.groups.methods.patch.parameters.updateMask.format - resources.accounts.resources.platforms.resources.groups.methods.patch.parameters.updateMask.location - resources.accounts.resources.platforms.resources.groups.methods.patch.parameters.updateMask.type - resources.accounts.resources.platforms.resources.groups.methods.patch.path - resources.accounts.resources.platforms.resources.groups.methods.patch.request.$ref - resources.accounts.resources.platforms.resources.groups.methods.patch.response.$ref - resources.accounts.resources.platforms.resources.groups.methods.patch.scopes The following keys were changed: - resources.accounts.resources.platforms.resources.childAccounts.resources.sites.methods.get.scopes - resources.accounts.resources.platforms.resources.groups.methods.get.scopes
1 parent 9998bbe commit a468a4b

File tree

3 files changed

+213
-6
lines changed

3 files changed

+213
-6
lines changed

‎discovery/adsenseplatform-v1alpha.json

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,8 @@
203203
"$ref": "PlatformChildSite"
204204
},
205205
"scopes": [
206-
"https://www.googleapis.com/auth/adsense"
206+
"https://www.googleapis.com/auth/adsense",
207+
"https://www.googleapis.com/auth/adsense.readonly"
207208
]
208209
},
209210
"list": {
@@ -305,7 +306,8 @@
305306
"$ref": "PlatformGroup"
306307
},
307308
"scopes": [
308-
"https://www.googleapis.com/auth/adsense"
309+
"https://www.googleapis.com/auth/adsense",
310+
"https://www.googleapis.com/auth/adsense.readonly"
309311
]
310312
},
311313
"list": {
@@ -344,6 +346,40 @@
344346
"https://www.googleapis.com/auth/adsense",
345347
"https://www.googleapis.com/auth/adsense.readonly"
346348
]
349+
},
350+
"patch": {
351+
"description": "Update a Platform Group.",
352+
"flatPath": "v1alpha/accounts/{accountsId}/platforms/{platformsId}/groups/{groupsId}",
353+
"httpMethod": "PATCH",
354+
"id": "adsenseplatform.accounts.platforms.groups.patch",
355+
"parameterOrder": [
356+
"name"
357+
],
358+
"parameters": {
359+
"name": {
360+
"description": "Identifier. Format: accounts/{account}/platforms/{platform}/groups/{platform_group}",
361+
"location": "path",
362+
"pattern": "^accounts/[^/]+/platforms/[^/]+/groups/[^/]+$",
363+
"required": true,
364+
"type": "string"
365+
},
366+
"updateMask": {
367+
"description": "Optional. The list of fields to update - currently only supports updating the `description` field.",
368+
"format": "google-fieldmask",
369+
"location": "query",
370+
"type": "string"
371+
}
372+
},
373+
"path": "v1alpha/{+name}",
374+
"request": {
375+
"$ref": "PlatformGroup"
376+
},
377+
"response": {
378+
"$ref": "PlatformGroup"
379+
},
380+
"scopes": [
381+
"https://www.googleapis.com/auth/adsense"
382+
]
347383
}
348384
}
349385
}
@@ -689,7 +725,7 @@
689725
}
690726
}
691727
},
692-
"revision": "20250623",
728+
"revision": "20250703",
693729
"rootUrl": "https://adsenseplatform.googleapis.com/",
694730
"schemas": {
695731
"Account": {

‎src/apis/adsenseplatform/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"webpack": "webpack"
2929
},
3030
"dependencies": {
31-
"googleapis-common": "^8.0.0"
31+
"googleapis-common": "^8.0.2-rc.0"
3232
},
3333
"devDependencies": {
3434
"@microsoft/api-documenter": "^7.8.10",

‎src/apis/adsenseplatform/v1alpha.ts

Lines changed: 173 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,10 @@ export namespace adsenseplatform_v1alpha {
787787
* async function main() {
788788
* const auth = new google.auth.GoogleAuth({
789789
* // Scopes can be specified either as an array or as a single, space-delimited string.
790-
* scopes: ['https://www.googleapis.com/auth/adsense'],
790+
* scopes: [
791+
* 'https://www.googleapis.com/auth/adsense',
792+
* 'https://www.googleapis.com/auth/adsense.readonly',
793+
* ],
791794
* });
792795
*
793796
* // Acquire an auth client, and bind it to all future calls
@@ -1278,7 +1281,10 @@ export namespace adsenseplatform_v1alpha {
12781281
* async function main() {
12791282
* const auth = new google.auth.GoogleAuth({
12801283
* // Scopes can be specified either as an array or as a single, space-delimited string.
1281-
* scopes: ['https://www.googleapis.com/auth/adsense'],
1284+
* scopes: [
1285+
* 'https://www.googleapis.com/auth/adsense',
1286+
* 'https://www.googleapis.com/auth/adsense.readonly',
1287+
* ],
12821288
* });
12831289
*
12841290
* // Acquire an auth client, and bind it to all future calls
@@ -1542,6 +1548,155 @@ export namespace adsenseplatform_v1alpha {
15421548
return createAPIRequest<Schema$ListPlatformGroupsResponse>(parameters);
15431549
}
15441550
}
1551+
1552+
/**
1553+
* Update a Platform Group.
1554+
* @example
1555+
* ```js
1556+
* // Before running the sample:
1557+
* // - Enable the API at:
1558+
* // https://console.developers.google.com/apis/api/adsenseplatform.googleapis.com
1559+
* // - Login into gcloud by running:
1560+
* // ```sh
1561+
* // $ gcloud auth application-default login
1562+
* // ```
1563+
* // - Install the npm module by running:
1564+
* // ```sh
1565+
* // $ npm install googleapis
1566+
* // ```
1567+
*
1568+
* const {google} = require('googleapis');
1569+
* const adsenseplatform = google.adsenseplatform('v1alpha');
1570+
*
1571+
* async function main() {
1572+
* const auth = new google.auth.GoogleAuth({
1573+
* // Scopes can be specified either as an array or as a single, space-delimited string.
1574+
* scopes: ['https://www.googleapis.com/auth/adsense'],
1575+
* });
1576+
*
1577+
* // Acquire an auth client, and bind it to all future calls
1578+
* const authClient = await auth.getClient();
1579+
* google.options({auth: authClient});
1580+
*
1581+
* // Do the magic
1582+
* const res = await adsenseplatform.accounts.platforms.groups.patch({
1583+
* // Identifier. Format: accounts/{account\}/platforms/{platform\}/groups/{platform_group\}
1584+
* name: 'accounts/my-account/platforms/my-platform/groups/my-group',
1585+
* // Optional. The list of fields to update - currently only supports updating the `description` field.
1586+
* updateMask: 'placeholder-value',
1587+
*
1588+
* // Request body metadata
1589+
* requestBody: {
1590+
* // request body parameters
1591+
* // {
1592+
* // "description": "my_description",
1593+
* // "name": "my_name",
1594+
* // "revshareMillipercent": {}
1595+
* // }
1596+
* },
1597+
* });
1598+
* console.log(res.data);
1599+
*
1600+
* // Example response
1601+
* // {
1602+
* // "description": "my_description",
1603+
* // "name": "my_name",
1604+
* // "revshareMillipercent": {}
1605+
* // }
1606+
* }
1607+
*
1608+
* main().catch(e => {
1609+
* console.error(e);
1610+
* throw e;
1611+
* });
1612+
*
1613+
* ```
1614+
*
1615+
* @param params - Parameters for request
1616+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1617+
* @param callback - Optional callback that handles the response.
1618+
* @returns A promise if used with async/await, or void if used with a callback.
1619+
*/
1620+
patch(
1621+
params: Params$Resource$Accounts$Platforms$Groups$Patch,
1622+
options: StreamMethodOptions
1623+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
1624+
patch(
1625+
params?: Params$Resource$Accounts$Platforms$Groups$Patch,
1626+
options?: MethodOptions
1627+
): Promise<GaxiosResponseWithHTTP2<Schema$PlatformGroup>>;
1628+
patch(
1629+
params: Params$Resource$Accounts$Platforms$Groups$Patch,
1630+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
1631+
callback: BodyResponseCallback<Readable>
1632+
): void;
1633+
patch(
1634+
params: Params$Resource$Accounts$Platforms$Groups$Patch,
1635+
options: MethodOptions | BodyResponseCallback<Schema$PlatformGroup>,
1636+
callback: BodyResponseCallback<Schema$PlatformGroup>
1637+
): void;
1638+
patch(
1639+
params: Params$Resource$Accounts$Platforms$Groups$Patch,
1640+
callback: BodyResponseCallback<Schema$PlatformGroup>
1641+
): void;
1642+
patch(callback: BodyResponseCallback<Schema$PlatformGroup>): void;
1643+
patch(
1644+
paramsOrCallback?:
1645+
| Params$Resource$Accounts$Platforms$Groups$Patch
1646+
| BodyResponseCallback<Schema$PlatformGroup>
1647+
| BodyResponseCallback<Readable>,
1648+
optionsOrCallback?:
1649+
| MethodOptions
1650+
| StreamMethodOptions
1651+
| BodyResponseCallback<Schema$PlatformGroup>
1652+
| BodyResponseCallback<Readable>,
1653+
callback?:
1654+
| BodyResponseCallback<Schema$PlatformGroup>
1655+
| BodyResponseCallback<Readable>
1656+
):
1657+
| void
1658+
| Promise<GaxiosResponseWithHTTP2<Schema$PlatformGroup>>
1659+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
1660+
let params = (paramsOrCallback ||
1661+
{}) as Params$Resource$Accounts$Platforms$Groups$Patch;
1662+
let options = (optionsOrCallback || {}) as MethodOptions;
1663+
1664+
if (typeof paramsOrCallback === 'function') {
1665+
callback = paramsOrCallback;
1666+
params = {} as Params$Resource$Accounts$Platforms$Groups$Patch;
1667+
options = {};
1668+
}
1669+
1670+
if (typeof optionsOrCallback === 'function') {
1671+
callback = optionsOrCallback;
1672+
options = {};
1673+
}
1674+
1675+
const rootUrl =
1676+
options.rootUrl || 'https://adsenseplatform.googleapis.com/';
1677+
const parameters = {
1678+
options: Object.assign(
1679+
{
1680+
url: (rootUrl + '/v1alpha/{+name}').replace(/([^:]\/)\/+/g, '$1'),
1681+
method: 'PATCH',
1682+
apiVersion: '',
1683+
},
1684+
options
1685+
),
1686+
params,
1687+
requiredParams: ['name'],
1688+
pathParams: ['name'],
1689+
context: this.context,
1690+
};
1691+
if (callback) {
1692+
createAPIRequest<Schema$PlatformGroup>(
1693+
parameters,
1694+
callback as BodyResponseCallback<unknown>
1695+
);
1696+
} else {
1697+
return createAPIRequest<Schema$PlatformGroup>(parameters);
1698+
}
1699+
}
15451700
}
15461701

15471702
export interface Params$Resource$Accounts$Platforms$Groups$Get
@@ -1566,6 +1721,22 @@ export namespace adsenseplatform_v1alpha {
15661721
*/
15671722
parent?: string;
15681723
}
1724+
export interface Params$Resource$Accounts$Platforms$Groups$Patch
1725+
extends StandardParameters {
1726+
/**
1727+
* Identifier. Format: accounts/{account\}/platforms/{platform\}/groups/{platform_group\}
1728+
*/
1729+
name?: string;
1730+
/**
1731+
* Optional. The list of fields to update - currently only supports updating the `description` field.
1732+
*/
1733+
updateMask?: string;
1734+
1735+
/**
1736+
* Request body metadata
1737+
*/
1738+
requestBody?: Schema$PlatformGroup;
1739+
}
15691740

15701741
export class Resource$Platforms {
15711742
context: APIRequestContext;

0 commit comments

Comments
 (0)