@google-shopping/lfp 0.8.0 → 0.9.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/README.md +40 -119
- package/build/protos/protos.d.ts +4 -621
- package/build/protos/protos.js +154 -2077
- package/build/protos/protos.json +22 -206
- package/build/src/index.d.ts +12 -12
- package/build/src/index.js +4 -4
- package/build/src/index.js.map +1 -1
- package/build/src/v1/gapic_metadata.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
[//]: # "This README.md file is auto-generated, all changes to this file will be lost."
|
|
2
|
-
[//]: # "
|
|
2
|
+
[//]: # "The comments you see below are used to generate those parts of the template in later states."
|
|
3
3
|
<img src="https://avatars2.githubusercontent.com/u/2810941?v=3&s=96" alt="Google Cloud Platform logo" title="Google Cloud Platform" align="right" height="96" width="96"/>
|
|
4
4
|
|
|
5
|
-
# [Merchant API:
|
|
6
|
-
|
|
7
|
-
[](https://cloud.google.com/terms/launch-stages)
|
|
8
|
-
[](https://www.npmjs.org/package/@google-shopping/lfp)
|
|
9
|
-
|
|
5
|
+
# [Merchant API: Nodejs Client][homepage]
|
|
10
6
|
|
|
7
|
+
This library is considered to be **stable**. The code surface will not change in backwards-incompatible ways
|
|
8
|
+
unless absolutely necessary (e.g. because of critical security issues) or with
|
|
9
|
+
an extensive deprecation period. Issues and requests against **stable** libraries
|
|
10
|
+
are addressed with the highest priority
|
|
11
11
|
|
|
12
|
+
[](https://www.npmjs.org/package/@google-shopping/lfp)
|
|
12
13
|
|
|
13
14
|
Merchant API client for Node.js
|
|
14
15
|
|
|
16
|
+
[//]: # "partials.introduction"
|
|
15
17
|
|
|
16
18
|
A comprehensive list of changes in each version may be found in
|
|
17
|
-
[the CHANGELOG]
|
|
19
|
+
[the CHANGELOG][homepage_changelog].
|
|
18
20
|
|
|
19
|
-
* [Merchant API
|
|
20
|
-
* [Merchant API Documentation]
|
|
21
|
-
* [github.com/googleapis/google-cloud-node/packages/google-shopping-merchant-lfp](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-shopping-merchant-lfp)
|
|
21
|
+
* [Merchant API Nodejs Client API Reference](https://cloud.google.com/nodejs/docs/reference/lfp/latest)
|
|
22
|
+
* [Merchant API Documentation](https://developers.google.com/merchant/api)
|
|
22
23
|
|
|
23
24
|
Read more about the client libraries for Cloud APIs, including the older
|
|
24
25
|
Google APIs Client Libraries, in [Client Libraries Explained][explained].
|
|
@@ -27,18 +28,15 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].
|
|
|
27
28
|
|
|
28
29
|
**Table of contents:**
|
|
29
30
|
|
|
30
|
-
|
|
31
31
|
* [Quickstart](#quickstart)
|
|
32
32
|
* [Before you begin](#before-you-begin)
|
|
33
33
|
* [Installing the client library](#installing-the-client-library)
|
|
34
|
-
|
|
35
|
-
* [Samples](#samples)
|
|
34
|
+
|
|
36
35
|
* [Versioning](#versioning)
|
|
37
36
|
* [Contributing](#contributing)
|
|
38
37
|
* [License](#license)
|
|
39
38
|
|
|
40
39
|
## Quickstart
|
|
41
|
-
|
|
42
40
|
### Before you begin
|
|
43
41
|
|
|
44
42
|
1. [Select or create a Cloud Platform project][projects].
|
|
@@ -46,103 +44,38 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].
|
|
|
46
44
|
1. [Enable the Merchant API API][enable_api].
|
|
47
45
|
1. [Set up authentication][auth] so you can access the
|
|
48
46
|
API from your local workstation.
|
|
49
|
-
|
|
50
47
|
### Installing the client library
|
|
51
48
|
|
|
52
49
|
```bash
|
|
53
50
|
npm install @google-shopping/lfp
|
|
54
51
|
```
|
|
55
52
|
|
|
56
|
-
|
|
57
|
-
### Using the client library
|
|
58
|
-
|
|
59
|
-
```javascript
|
|
60
|
-
/**
|
|
61
|
-
* This snippet has been automatically generated and should be regarded as a code template only.
|
|
62
|
-
* It will require modifications to work.
|
|
63
|
-
* It may require correct/in-range values for request initialization.
|
|
64
|
-
* TODO(developer): Uncomment these variables before running the sample.
|
|
65
|
-
*/
|
|
66
|
-
/**
|
|
67
|
-
* Required. The LFP partner.
|
|
68
|
-
* Format: `accounts/{account}`
|
|
69
|
-
*/
|
|
70
|
-
// const parent = 'abc123'
|
|
71
|
-
/**
|
|
72
|
-
* Required. The Merchant Center id of the merchant to list stores for.
|
|
73
|
-
*/
|
|
74
|
-
// const targetAccount = 1234
|
|
75
|
-
/**
|
|
76
|
-
* Optional. The maximum number of `LfpStore` resources for the given account
|
|
77
|
-
* to return. The service returns fewer than this value if the number of
|
|
78
|
-
* stores for the given account is less than the `pageSize`. The default value
|
|
79
|
-
* is 250. The maximum value is 1000; If a value higher than the maximum is
|
|
80
|
-
* specified, then the `pageSize` will default to the maximum.
|
|
81
|
-
*/
|
|
82
|
-
// const pageSize = 1234
|
|
83
|
-
/**
|
|
84
|
-
* Optional. A page token, received from a previous `ListLfpStoresRequest`
|
|
85
|
-
* call. Provide the page token to retrieve the subsequent page. When
|
|
86
|
-
* paginating, all other parameters provided to `ListLfpStoresRequest` must
|
|
87
|
-
* match the call that provided the page token. The token returned as
|
|
88
|
-
* nextPageToken google.shopping.merchant.lfp.v1beta.ListLfpStoresResponse.next_page_token
|
|
89
|
-
* in the response to the previous request.
|
|
90
|
-
*/
|
|
91
|
-
// const pageToken = 'abc123'
|
|
92
|
-
|
|
93
|
-
// Imports the Lfp library
|
|
94
|
-
const {LfpStoreServiceClient} = require('@google-shopping/lfp').v1beta;
|
|
95
|
-
|
|
96
|
-
// Instantiates a client
|
|
97
|
-
const lfpClient = new LfpStoreServiceClient();
|
|
98
|
-
|
|
99
|
-
async function callListLfpStores() {
|
|
100
|
-
// Construct request
|
|
101
|
-
const request = {
|
|
102
|
-
parent,
|
|
103
|
-
targetAccount,
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
// Run request
|
|
107
|
-
const iterable = lfpClient.listLfpStoresAsync(request);
|
|
108
|
-
for await (const response of iterable) {
|
|
109
|
-
console.log(response);
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
callListLfpStores();
|
|
114
|
-
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
|
|
53
|
+
[//]: # "partials.body"
|
|
118
54
|
|
|
119
55
|
## Samples
|
|
120
56
|
|
|
121
|
-
Samples are in the [`samples/`]
|
|
122
|
-
|
|
123
|
-
| Sample | Source Code |
|
|
124
|
-
| --------------------------- | --------------------------------- |
|
|
125
|
-
|
|
|
126
|
-
|
|
|
127
|
-
|
|
|
128
|
-
|
|
|
129
|
-
|
|
|
130
|
-
|
|
|
131
|
-
|
|
|
132
|
-
|
|
|
133
|
-
|
|
|
134
|
-
|
|
|
135
|
-
|
|
|
136
|
-
|
|
|
137
|
-
|
|
|
138
|
-
|
|
|
139
|
-
|
|
|
140
|
-
|
|
57
|
+
Samples are in the [`samples/`][homepage_samples] directory. Each sample's `README.md` has instructions for running its sample.
|
|
58
|
+
|
|
59
|
+
| Sample | Source Code |
|
|
60
|
+
| --------------------------- | --------------------------------- |
|
|
61
|
+
| insert lfp inventory | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-lfp/samples/generated/v1/lfp_inventory_service.insert_lfp_inventory.js) |
|
|
62
|
+
| get lfp merchant state | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-lfp/samples/generated/v1/lfp_merchant_state_service.get_lfp_merchant_state.js) |
|
|
63
|
+
| insert lfp sale | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-lfp/samples/generated/v1/lfp_sale_service.insert_lfp_sale.js) |
|
|
64
|
+
| delete lfp store | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-lfp/samples/generated/v1/lfp_store_service.delete_lfp_store.js) |
|
|
65
|
+
| get lfp store | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-lfp/samples/generated/v1/lfp_store_service.get_lfp_store.js) |
|
|
66
|
+
| insert lfp store | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-lfp/samples/generated/v1/lfp_store_service.insert_lfp_store.js) |
|
|
67
|
+
| list lfp stores | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-lfp/samples/generated/v1/lfp_store_service.list_lfp_stores.js) |
|
|
68
|
+
| shopping | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-lfp/samples/generated/v1/snippet_metadata_google.shopping.merchant.lfp.v1.json) |
|
|
69
|
+
| insert lfp inventory | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-lfp/samples/generated/v1beta/lfp_inventory_service.insert_lfp_inventory.js) |
|
|
70
|
+
| get lfp merchant state | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-lfp/samples/generated/v1beta/lfp_merchant_state_service.get_lfp_merchant_state.js) |
|
|
71
|
+
| insert lfp sale | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-lfp/samples/generated/v1beta/lfp_sale_service.insert_lfp_sale.js) |
|
|
72
|
+
| delete lfp store | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-lfp/samples/generated/v1beta/lfp_store_service.delete_lfp_store.js) |
|
|
73
|
+
| get lfp store | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-lfp/samples/generated/v1beta/lfp_store_service.get_lfp_store.js) |
|
|
74
|
+
| insert lfp store | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-lfp/samples/generated/v1beta/lfp_store_service.insert_lfp_store.js) |
|
|
75
|
+
| list lfp stores | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-lfp/samples/generated/v1beta/lfp_store_service.list_lfp_stores.js) |
|
|
76
|
+
| shopping | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-lfp/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.lfp.v1beta.json) |
|
|
141
77
|
|
|
142
78
|
|
|
143
|
-
The [Merchant API Node.js Client API Reference][client-docs] documentation
|
|
144
|
-
also contains samples.
|
|
145
|
-
|
|
146
79
|
## Supported Node.js Versions
|
|
147
80
|
|
|
148
81
|
Our client libraries follow the [Node.js release schedule](https://github.com/nodejs/release#release-schedule).
|
|
@@ -168,41 +101,29 @@ for versions compatible with Node.js 8.
|
|
|
168
101
|
|
|
169
102
|
This library follows [Semantic Versioning](http://semver.org/).
|
|
170
103
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
This library is considered to be in **preview**. This means it is still a
|
|
178
|
-
work-in-progress and under active development. Any release is subject to
|
|
179
|
-
backwards-incompatible changes at any time.
|
|
180
|
-
|
|
181
|
-
|
|
182
104
|
More Information: [Google Cloud Platform Launch Stages][launch_stages]
|
|
183
105
|
|
|
184
106
|
[launch_stages]: https://cloud.google.com/terms/launch-stages
|
|
185
107
|
|
|
186
108
|
## Contributing
|
|
187
109
|
|
|
188
|
-
Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/CONTRIBUTING.md).
|
|
110
|
+
Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-lfp/CONTRIBUTING.md).
|
|
189
111
|
|
|
190
|
-
Please note that this `README.md
|
|
112
|
+
Please note that this `README.md`
|
|
191
113
|
and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`)
|
|
192
|
-
are generated from a central template.
|
|
193
|
-
to its templates in
|
|
194
|
-
[directory](https://github.com/googleapis/synthtool).
|
|
114
|
+
are generated from a central template.
|
|
195
115
|
|
|
196
116
|
## License
|
|
197
117
|
|
|
198
118
|
Apache Version 2.0
|
|
199
119
|
|
|
200
|
-
See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE)
|
|
120
|
+
See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-lfp/LICENSE)
|
|
201
121
|
|
|
202
|
-
[client-docs]: https://cloud.google.com/nodejs/docs/reference/merchantapi/latest
|
|
203
|
-
[product-docs]: https://developers.google.com/merchant/api
|
|
204
122
|
[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png
|
|
205
123
|
[projects]: https://console.cloud.google.com/project
|
|
206
124
|
[billing]: https://support.google.com/cloud/answer/6293499#enable-billing
|
|
207
125
|
[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=merchantapi.googleapis.com
|
|
208
126
|
[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local
|
|
127
|
+
[homepage_samples]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-lfp/samples
|
|
128
|
+
[homepage_changelog]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-lfp/CHANGELOG.md
|
|
129
|
+
[homepage]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-lfp
|