@googleapis/merchantapi 6.0.1 → 9.0.0
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/README.md +9 -0
- package/accounts_v1beta.ts +6894 -534
- package/build/accounts_v1beta.d.ts +4933 -137
- package/build/accounts_v1beta.js +679 -26
- package/build/accounts_v1beta.js.map +1 -1
- package/build/conversions_v1beta.d.ts +336 -1
- package/build/conversions_v1beta.js.map +1 -1
- package/build/datasources_v1beta.d.ts +412 -6
- package/build/datasources_v1beta.js.map +1 -1
- package/build/inventories_v1beta.d.ts +336 -2
- package/build/inventories_v1beta.js.map +1 -1
- package/build/issueresolution_v1beta.d.ts +367 -1
- package/build/issueresolution_v1beta.js +48 -0
- package/build/issueresolution_v1beta.js.map +1 -1
- package/build/lfp_v1beta.d.ts +436 -3
- package/build/lfp_v1beta.js.map +1 -1
- package/build/notifications_v1beta.d.ts +272 -1
- package/build/notifications_v1beta.js.map +1 -1
- package/build/ordertracking_v1beta.d.ts +75 -1
- package/build/ordertracking_v1beta.js.map +1 -1
- package/build/products_v1beta.d.ts +352 -45
- package/build/products_v1beta.js.map +1 -1
- package/build/promotions_v1beta.d.ts +171 -4
- package/build/promotions_v1beta.js.map +1 -1
- package/build/quota_v1beta.d.ts +52 -1
- package/build/quota_v1beta.js.map +1 -1
- package/build/reports_v1beta.d.ts +58 -1
- package/build/reports_v1beta.js.map +1 -1
- package/build/reviews_v1beta.d.ts +434 -2
- package/build/reviews_v1beta.js.map +1 -1
- package/conversions_v1beta.ts +336 -1
- package/datasources_v1beta.ts +412 -6
- package/inventories_v1beta.ts +336 -2
- package/issueresolution_v1beta.ts +465 -1
- package/lfp_v1beta.ts +436 -3
- package/notifications_v1beta.ts +272 -1
- package/ordertracking_v1beta.ts +75 -1
- package/package.json +1 -1
- package/products_v1beta.ts +352 -45
- package/promotions_v1beta.ts +171 -4
- package/quota_v1beta.ts +52 -1
- package/reports_v1beta.ts +58 -1
- package/reviews_v1beta.ts +434 -2
package/reviews_v1beta.ts
CHANGED
|
@@ -411,17 +411,25 @@ export namespace merchantapi_reviews_v1beta {
|
|
|
411
411
|
*/
|
|
412
412
|
cons?: string[] | null;
|
|
413
413
|
/**
|
|
414
|
-
*
|
|
414
|
+
* Optional. The content of the review. If empty, the content might still get populated from pros and cons.
|
|
415
415
|
*/
|
|
416
416
|
content?: string | null;
|
|
417
417
|
/**
|
|
418
418
|
* Optional. Contains GTINs (global trade item numbers) associated with a product. Sub-types of GTINs (e.g. UPC, EAN, ISBN, JAN) are supported.
|
|
419
419
|
*/
|
|
420
420
|
gtins?: string[] | null;
|
|
421
|
+
/**
|
|
422
|
+
* Optional. Indicates whether the review is incentivized.
|
|
423
|
+
*/
|
|
424
|
+
isIncentivizedReview?: boolean | null;
|
|
421
425
|
/**
|
|
422
426
|
* Optional. Indicates whether the review is marked as spam in the publisher's system.
|
|
423
427
|
*/
|
|
424
428
|
isSpam?: boolean | null;
|
|
429
|
+
/**
|
|
430
|
+
* Optional. Indicates whether the reviewer's purchase is verified.
|
|
431
|
+
*/
|
|
432
|
+
isVerifiedPurchase?: boolean | null;
|
|
425
433
|
/**
|
|
426
434
|
* Optional. The maximum possible number for the rating. The value of the max rating must be greater than the value of the min attribute.
|
|
427
435
|
*/
|
|
@@ -595,7 +603,7 @@ export namespace merchantapi_reviews_v1beta {
|
|
|
595
603
|
*/
|
|
596
604
|
eventTime?: string | null;
|
|
597
605
|
/**
|
|
598
|
-
* Optional. The product expiration time. This field will not
|
|
606
|
+
* Optional. The product expiration time. This field will not be set if the notification is sent for a product deletion event.
|
|
599
607
|
*/
|
|
600
608
|
expirationTime?: string | null;
|
|
601
609
|
/**
|
|
@@ -650,6 +658,50 @@ export namespace merchantapi_reviews_v1beta {
|
|
|
650
658
|
|
|
651
659
|
/**
|
|
652
660
|
* Deletes merchant review.
|
|
661
|
+
* @example
|
|
662
|
+
* ```js
|
|
663
|
+
* // Before running the sample:
|
|
664
|
+
* // - Enable the API at:
|
|
665
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
666
|
+
* // - Login into gcloud by running:
|
|
667
|
+
* // ```sh
|
|
668
|
+
* // $ gcloud auth application-default login
|
|
669
|
+
* // ```
|
|
670
|
+
* // - Install the npm module by running:
|
|
671
|
+
* // ```sh
|
|
672
|
+
* // $ npm install googleapis
|
|
673
|
+
* // ```
|
|
674
|
+
*
|
|
675
|
+
* const {google} = require('googleapis');
|
|
676
|
+
* const merchantapi = google.merchantapi('reviews_v1beta');
|
|
677
|
+
*
|
|
678
|
+
* async function main() {
|
|
679
|
+
* const auth = new google.auth.GoogleAuth({
|
|
680
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
681
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
682
|
+
* });
|
|
683
|
+
*
|
|
684
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
685
|
+
* const authClient = await auth.getClient();
|
|
686
|
+
* google.options({auth: authClient});
|
|
687
|
+
*
|
|
688
|
+
* // Do the magic
|
|
689
|
+
* const res = await merchantapi.accounts.merchantReviews.delete({
|
|
690
|
+
* // Required. The ID of the merchant review. Format: accounts/{account\}/merchantReviews/{merchantReview\}
|
|
691
|
+
* name: 'accounts/my-account/merchantReviews/my-merchantReview',
|
|
692
|
+
* });
|
|
693
|
+
* console.log(res.data);
|
|
694
|
+
*
|
|
695
|
+
* // Example response
|
|
696
|
+
* // {}
|
|
697
|
+
* }
|
|
698
|
+
*
|
|
699
|
+
* main().catch(e => {
|
|
700
|
+
* console.error(e);
|
|
701
|
+
* throw e;
|
|
702
|
+
* });
|
|
703
|
+
*
|
|
704
|
+
* ```
|
|
653
705
|
*
|
|
654
706
|
* @param params - Parameters for request
|
|
655
707
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -741,6 +793,57 @@ export namespace merchantapi_reviews_v1beta {
|
|
|
741
793
|
|
|
742
794
|
/**
|
|
743
795
|
* Gets a merchant review.
|
|
796
|
+
* @example
|
|
797
|
+
* ```js
|
|
798
|
+
* // Before running the sample:
|
|
799
|
+
* // - Enable the API at:
|
|
800
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
801
|
+
* // - Login into gcloud by running:
|
|
802
|
+
* // ```sh
|
|
803
|
+
* // $ gcloud auth application-default login
|
|
804
|
+
* // ```
|
|
805
|
+
* // - Install the npm module by running:
|
|
806
|
+
* // ```sh
|
|
807
|
+
* // $ npm install googleapis
|
|
808
|
+
* // ```
|
|
809
|
+
*
|
|
810
|
+
* const {google} = require('googleapis');
|
|
811
|
+
* const merchantapi = google.merchantapi('reviews_v1beta');
|
|
812
|
+
*
|
|
813
|
+
* async function main() {
|
|
814
|
+
* const auth = new google.auth.GoogleAuth({
|
|
815
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
816
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
817
|
+
* });
|
|
818
|
+
*
|
|
819
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
820
|
+
* const authClient = await auth.getClient();
|
|
821
|
+
* google.options({auth: authClient});
|
|
822
|
+
*
|
|
823
|
+
* // Do the magic
|
|
824
|
+
* const res = await merchantapi.accounts.merchantReviews.get({
|
|
825
|
+
* // Required. The ID of the merchant review. Format: accounts/{account\}/merchantReviews/{merchantReview\}
|
|
826
|
+
* name: 'accounts/my-account/merchantReviews/my-merchantReview',
|
|
827
|
+
* });
|
|
828
|
+
* console.log(res.data);
|
|
829
|
+
*
|
|
830
|
+
* // Example response
|
|
831
|
+
* // {
|
|
832
|
+
* // "attributes": {},
|
|
833
|
+
* // "customAttributes": [],
|
|
834
|
+
* // "dataSource": "my_dataSource",
|
|
835
|
+
* // "merchantReviewId": "my_merchantReviewId",
|
|
836
|
+
* // "merchantReviewStatus": {},
|
|
837
|
+
* // "name": "my_name"
|
|
838
|
+
* // }
|
|
839
|
+
* }
|
|
840
|
+
*
|
|
841
|
+
* main().catch(e => {
|
|
842
|
+
* console.error(e);
|
|
843
|
+
* throw e;
|
|
844
|
+
* });
|
|
845
|
+
*
|
|
846
|
+
* ```
|
|
744
847
|
*
|
|
745
848
|
* @param params - Parameters for request
|
|
746
849
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -832,6 +935,72 @@ export namespace merchantapi_reviews_v1beta {
|
|
|
832
935
|
|
|
833
936
|
/**
|
|
834
937
|
* Inserts a review for your Merchant Center account. If the review already exists, then the review is replaced with the new instance.
|
|
938
|
+
* @example
|
|
939
|
+
* ```js
|
|
940
|
+
* // Before running the sample:
|
|
941
|
+
* // - Enable the API at:
|
|
942
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
943
|
+
* // - Login into gcloud by running:
|
|
944
|
+
* // ```sh
|
|
945
|
+
* // $ gcloud auth application-default login
|
|
946
|
+
* // ```
|
|
947
|
+
* // - Install the npm module by running:
|
|
948
|
+
* // ```sh
|
|
949
|
+
* // $ npm install googleapis
|
|
950
|
+
* // ```
|
|
951
|
+
*
|
|
952
|
+
* const {google} = require('googleapis');
|
|
953
|
+
* const merchantapi = google.merchantapi('reviews_v1beta');
|
|
954
|
+
*
|
|
955
|
+
* async function main() {
|
|
956
|
+
* const auth = new google.auth.GoogleAuth({
|
|
957
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
958
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
959
|
+
* });
|
|
960
|
+
*
|
|
961
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
962
|
+
* const authClient = await auth.getClient();
|
|
963
|
+
* google.options({auth: authClient});
|
|
964
|
+
*
|
|
965
|
+
* // Do the magic
|
|
966
|
+
* const res = await merchantapi.accounts.merchantReviews.insert({
|
|
967
|
+
* // Required. The data source of the [merchantreview](https://support.google.com/merchants/answer/7045996?sjid=5253581244217581976-EU) Format: `accounts/{account\}/dataSources/{datasource\}`.
|
|
968
|
+
* dataSource: 'placeholder-value',
|
|
969
|
+
* // Required. The account where the merchant review will be inserted. Format: accounts/{account\}
|
|
970
|
+
* parent: 'accounts/my-account',
|
|
971
|
+
*
|
|
972
|
+
* // Request body metadata
|
|
973
|
+
* requestBody: {
|
|
974
|
+
* // request body parameters
|
|
975
|
+
* // {
|
|
976
|
+
* // "attributes": {},
|
|
977
|
+
* // "customAttributes": [],
|
|
978
|
+
* // "dataSource": "my_dataSource",
|
|
979
|
+
* // "merchantReviewId": "my_merchantReviewId",
|
|
980
|
+
* // "merchantReviewStatus": {},
|
|
981
|
+
* // "name": "my_name"
|
|
982
|
+
* // }
|
|
983
|
+
* },
|
|
984
|
+
* });
|
|
985
|
+
* console.log(res.data);
|
|
986
|
+
*
|
|
987
|
+
* // Example response
|
|
988
|
+
* // {
|
|
989
|
+
* // "attributes": {},
|
|
990
|
+
* // "customAttributes": [],
|
|
991
|
+
* // "dataSource": "my_dataSource",
|
|
992
|
+
* // "merchantReviewId": "my_merchantReviewId",
|
|
993
|
+
* // "merchantReviewStatus": {},
|
|
994
|
+
* // "name": "my_name"
|
|
995
|
+
* // }
|
|
996
|
+
* }
|
|
997
|
+
*
|
|
998
|
+
* main().catch(e => {
|
|
999
|
+
* console.error(e);
|
|
1000
|
+
* throw e;
|
|
1001
|
+
* });
|
|
1002
|
+
*
|
|
1003
|
+
* ```
|
|
835
1004
|
*
|
|
836
1005
|
* @param params - Parameters for request
|
|
837
1006
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -922,6 +1091,57 @@ export namespace merchantapi_reviews_v1beta {
|
|
|
922
1091
|
|
|
923
1092
|
/**
|
|
924
1093
|
* Lists merchant reviews.
|
|
1094
|
+
* @example
|
|
1095
|
+
* ```js
|
|
1096
|
+
* // Before running the sample:
|
|
1097
|
+
* // - Enable the API at:
|
|
1098
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
1099
|
+
* // - Login into gcloud by running:
|
|
1100
|
+
* // ```sh
|
|
1101
|
+
* // $ gcloud auth application-default login
|
|
1102
|
+
* // ```
|
|
1103
|
+
* // - Install the npm module by running:
|
|
1104
|
+
* // ```sh
|
|
1105
|
+
* // $ npm install googleapis
|
|
1106
|
+
* // ```
|
|
1107
|
+
*
|
|
1108
|
+
* const {google} = require('googleapis');
|
|
1109
|
+
* const merchantapi = google.merchantapi('reviews_v1beta');
|
|
1110
|
+
*
|
|
1111
|
+
* async function main() {
|
|
1112
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1113
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1114
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
1115
|
+
* });
|
|
1116
|
+
*
|
|
1117
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1118
|
+
* const authClient = await auth.getClient();
|
|
1119
|
+
* google.options({auth: authClient});
|
|
1120
|
+
*
|
|
1121
|
+
* // Do the magic
|
|
1122
|
+
* const res = await merchantapi.accounts.merchantReviews.list({
|
|
1123
|
+
* // Optional. The maximum number of merchant reviews to return. The service can return fewer than this value. The maximum value is 1000; values above 1000 are coerced to 1000. If unspecified, the maximum number of reviews is returned.
|
|
1124
|
+
* pageSize: 'placeholder-value',
|
|
1125
|
+
* // Optional. A page token, received from a previous `ListMerchantReviews` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListMerchantReviews` must match the call that provided the page token.
|
|
1126
|
+
* pageToken: 'placeholder-value',
|
|
1127
|
+
* // Required. The account to list merchant reviews for. Format: accounts/{account\}
|
|
1128
|
+
* parent: 'accounts/my-account',
|
|
1129
|
+
* });
|
|
1130
|
+
* console.log(res.data);
|
|
1131
|
+
*
|
|
1132
|
+
* // Example response
|
|
1133
|
+
* // {
|
|
1134
|
+
* // "merchantReviews": [],
|
|
1135
|
+
* // "nextPageToken": "my_nextPageToken"
|
|
1136
|
+
* // }
|
|
1137
|
+
* }
|
|
1138
|
+
*
|
|
1139
|
+
* main().catch(e => {
|
|
1140
|
+
* console.error(e);
|
|
1141
|
+
* throw e;
|
|
1142
|
+
* });
|
|
1143
|
+
*
|
|
1144
|
+
* ```
|
|
925
1145
|
*
|
|
926
1146
|
* @param params - Parameters for request
|
|
927
1147
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1069,6 +1289,50 @@ export namespace merchantapi_reviews_v1beta {
|
|
|
1069
1289
|
|
|
1070
1290
|
/**
|
|
1071
1291
|
* Deletes a product review.
|
|
1292
|
+
* @example
|
|
1293
|
+
* ```js
|
|
1294
|
+
* // Before running the sample:
|
|
1295
|
+
* // - Enable the API at:
|
|
1296
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
1297
|
+
* // - Login into gcloud by running:
|
|
1298
|
+
* // ```sh
|
|
1299
|
+
* // $ gcloud auth application-default login
|
|
1300
|
+
* // ```
|
|
1301
|
+
* // - Install the npm module by running:
|
|
1302
|
+
* // ```sh
|
|
1303
|
+
* // $ npm install googleapis
|
|
1304
|
+
* // ```
|
|
1305
|
+
*
|
|
1306
|
+
* const {google} = require('googleapis');
|
|
1307
|
+
* const merchantapi = google.merchantapi('reviews_v1beta');
|
|
1308
|
+
*
|
|
1309
|
+
* async function main() {
|
|
1310
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1311
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1312
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
1313
|
+
* });
|
|
1314
|
+
*
|
|
1315
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1316
|
+
* const authClient = await auth.getClient();
|
|
1317
|
+
* google.options({auth: authClient});
|
|
1318
|
+
*
|
|
1319
|
+
* // Do the magic
|
|
1320
|
+
* const res = await merchantapi.accounts.productReviews.delete({
|
|
1321
|
+
* // Required. The ID of the Product review. Format: accounts/{account\}/productReviews/{productReview\}
|
|
1322
|
+
* name: 'accounts/my-account/productReviews/my-productReview',
|
|
1323
|
+
* });
|
|
1324
|
+
* console.log(res.data);
|
|
1325
|
+
*
|
|
1326
|
+
* // Example response
|
|
1327
|
+
* // {}
|
|
1328
|
+
* }
|
|
1329
|
+
*
|
|
1330
|
+
* main().catch(e => {
|
|
1331
|
+
* console.error(e);
|
|
1332
|
+
* throw e;
|
|
1333
|
+
* });
|
|
1334
|
+
*
|
|
1335
|
+
* ```
|
|
1072
1336
|
*
|
|
1073
1337
|
* @param params - Parameters for request
|
|
1074
1338
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1160,6 +1424,57 @@ export namespace merchantapi_reviews_v1beta {
|
|
|
1160
1424
|
|
|
1161
1425
|
/**
|
|
1162
1426
|
* Gets a product review.
|
|
1427
|
+
* @example
|
|
1428
|
+
* ```js
|
|
1429
|
+
* // Before running the sample:
|
|
1430
|
+
* // - Enable the API at:
|
|
1431
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
1432
|
+
* // - Login into gcloud by running:
|
|
1433
|
+
* // ```sh
|
|
1434
|
+
* // $ gcloud auth application-default login
|
|
1435
|
+
* // ```
|
|
1436
|
+
* // - Install the npm module by running:
|
|
1437
|
+
* // ```sh
|
|
1438
|
+
* // $ npm install googleapis
|
|
1439
|
+
* // ```
|
|
1440
|
+
*
|
|
1441
|
+
* const {google} = require('googleapis');
|
|
1442
|
+
* const merchantapi = google.merchantapi('reviews_v1beta');
|
|
1443
|
+
*
|
|
1444
|
+
* async function main() {
|
|
1445
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1446
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1447
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
1448
|
+
* });
|
|
1449
|
+
*
|
|
1450
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1451
|
+
* const authClient = await auth.getClient();
|
|
1452
|
+
* google.options({auth: authClient});
|
|
1453
|
+
*
|
|
1454
|
+
* // Do the magic
|
|
1455
|
+
* const res = await merchantapi.accounts.productReviews.get({
|
|
1456
|
+
* // Required. The ID of the merchant review. Format: accounts/{account\}/productReviews/{productReview\}
|
|
1457
|
+
* name: 'accounts/my-account/productReviews/my-productReview',
|
|
1458
|
+
* });
|
|
1459
|
+
* console.log(res.data);
|
|
1460
|
+
*
|
|
1461
|
+
* // Example response
|
|
1462
|
+
* // {
|
|
1463
|
+
* // "attributes": {},
|
|
1464
|
+
* // "customAttributes": [],
|
|
1465
|
+
* // "dataSource": "my_dataSource",
|
|
1466
|
+
* // "name": "my_name",
|
|
1467
|
+
* // "productReviewId": "my_productReviewId",
|
|
1468
|
+
* // "productReviewStatus": {}
|
|
1469
|
+
* // }
|
|
1470
|
+
* }
|
|
1471
|
+
*
|
|
1472
|
+
* main().catch(e => {
|
|
1473
|
+
* console.error(e);
|
|
1474
|
+
* throw e;
|
|
1475
|
+
* });
|
|
1476
|
+
*
|
|
1477
|
+
* ```
|
|
1163
1478
|
*
|
|
1164
1479
|
* @param params - Parameters for request
|
|
1165
1480
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1251,6 +1566,72 @@ export namespace merchantapi_reviews_v1beta {
|
|
|
1251
1566
|
|
|
1252
1567
|
/**
|
|
1253
1568
|
* Inserts a product review.
|
|
1569
|
+
* @example
|
|
1570
|
+
* ```js
|
|
1571
|
+
* // Before running the sample:
|
|
1572
|
+
* // - Enable the API at:
|
|
1573
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
1574
|
+
* // - Login into gcloud by running:
|
|
1575
|
+
* // ```sh
|
|
1576
|
+
* // $ gcloud auth application-default login
|
|
1577
|
+
* // ```
|
|
1578
|
+
* // - Install the npm module by running:
|
|
1579
|
+
* // ```sh
|
|
1580
|
+
* // $ npm install googleapis
|
|
1581
|
+
* // ```
|
|
1582
|
+
*
|
|
1583
|
+
* const {google} = require('googleapis');
|
|
1584
|
+
* const merchantapi = google.merchantapi('reviews_v1beta');
|
|
1585
|
+
*
|
|
1586
|
+
* async function main() {
|
|
1587
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1588
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1589
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
1590
|
+
* });
|
|
1591
|
+
*
|
|
1592
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1593
|
+
* const authClient = await auth.getClient();
|
|
1594
|
+
* google.options({auth: authClient});
|
|
1595
|
+
*
|
|
1596
|
+
* // Do the magic
|
|
1597
|
+
* const res = await merchantapi.accounts.productReviews.insert({
|
|
1598
|
+
* // Required. Format: `accounts/{account\}/dataSources/{datasource\}`.
|
|
1599
|
+
* dataSource: 'placeholder-value',
|
|
1600
|
+
* // Required. The account where the product review will be inserted. Format: accounts/{account\}
|
|
1601
|
+
* parent: 'accounts/my-account',
|
|
1602
|
+
*
|
|
1603
|
+
* // Request body metadata
|
|
1604
|
+
* requestBody: {
|
|
1605
|
+
* // request body parameters
|
|
1606
|
+
* // {
|
|
1607
|
+
* // "attributes": {},
|
|
1608
|
+
* // "customAttributes": [],
|
|
1609
|
+
* // "dataSource": "my_dataSource",
|
|
1610
|
+
* // "name": "my_name",
|
|
1611
|
+
* // "productReviewId": "my_productReviewId",
|
|
1612
|
+
* // "productReviewStatus": {}
|
|
1613
|
+
* // }
|
|
1614
|
+
* },
|
|
1615
|
+
* });
|
|
1616
|
+
* console.log(res.data);
|
|
1617
|
+
*
|
|
1618
|
+
* // Example response
|
|
1619
|
+
* // {
|
|
1620
|
+
* // "attributes": {},
|
|
1621
|
+
* // "customAttributes": [],
|
|
1622
|
+
* // "dataSource": "my_dataSource",
|
|
1623
|
+
* // "name": "my_name",
|
|
1624
|
+
* // "productReviewId": "my_productReviewId",
|
|
1625
|
+
* // "productReviewStatus": {}
|
|
1626
|
+
* // }
|
|
1627
|
+
* }
|
|
1628
|
+
*
|
|
1629
|
+
* main().catch(e => {
|
|
1630
|
+
* console.error(e);
|
|
1631
|
+
* throw e;
|
|
1632
|
+
* });
|
|
1633
|
+
*
|
|
1634
|
+
* ```
|
|
1254
1635
|
*
|
|
1255
1636
|
* @param params - Parameters for request
|
|
1256
1637
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1341,6 +1722,57 @@ export namespace merchantapi_reviews_v1beta {
|
|
|
1341
1722
|
|
|
1342
1723
|
/**
|
|
1343
1724
|
* Lists product reviews.
|
|
1725
|
+
* @example
|
|
1726
|
+
* ```js
|
|
1727
|
+
* // Before running the sample:
|
|
1728
|
+
* // - Enable the API at:
|
|
1729
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
1730
|
+
* // - Login into gcloud by running:
|
|
1731
|
+
* // ```sh
|
|
1732
|
+
* // $ gcloud auth application-default login
|
|
1733
|
+
* // ```
|
|
1734
|
+
* // - Install the npm module by running:
|
|
1735
|
+
* // ```sh
|
|
1736
|
+
* // $ npm install googleapis
|
|
1737
|
+
* // ```
|
|
1738
|
+
*
|
|
1739
|
+
* const {google} = require('googleapis');
|
|
1740
|
+
* const merchantapi = google.merchantapi('reviews_v1beta');
|
|
1741
|
+
*
|
|
1742
|
+
* async function main() {
|
|
1743
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1744
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1745
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
1746
|
+
* });
|
|
1747
|
+
*
|
|
1748
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1749
|
+
* const authClient = await auth.getClient();
|
|
1750
|
+
* google.options({auth: authClient});
|
|
1751
|
+
*
|
|
1752
|
+
* // Do the magic
|
|
1753
|
+
* const res = await merchantapi.accounts.productReviews.list({
|
|
1754
|
+
* // Optional. The maximum number of products to return. The service may return fewer than this value.
|
|
1755
|
+
* pageSize: 'placeholder-value',
|
|
1756
|
+
* // Optional. A page token, received from a previous `ListProductReviews` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListProductReviews` must match the call that provided the page token.
|
|
1757
|
+
* pageToken: 'placeholder-value',
|
|
1758
|
+
* // Required. The account to list product reviews for. Format: accounts/{account\}
|
|
1759
|
+
* parent: 'accounts/my-account',
|
|
1760
|
+
* });
|
|
1761
|
+
* console.log(res.data);
|
|
1762
|
+
*
|
|
1763
|
+
* // Example response
|
|
1764
|
+
* // {
|
|
1765
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
1766
|
+
* // "productReviews": []
|
|
1767
|
+
* // }
|
|
1768
|
+
* }
|
|
1769
|
+
*
|
|
1770
|
+
* main().catch(e => {
|
|
1771
|
+
* console.error(e);
|
|
1772
|
+
* throw e;
|
|
1773
|
+
* });
|
|
1774
|
+
*
|
|
1775
|
+
* ```
|
|
1344
1776
|
*
|
|
1345
1777
|
* @param params - Parameters for request
|
|
1346
1778
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|