@@ -41,6 +41,10 @@ Creates a new `Shopify` instance.
41
41
[ OAuth 2.0] [ oauth ] access token. This option is mutually exclusive with the
42
42
` apiKey ` and ` password ` options. If you are looking for a premade solution to
43
43
obtain an access token, take a look at the [ shopify-token] [ ] module.
44
+ - ` agent ` - Optional - An object that is passed as the ` agent ` option to ` got ` .
45
+ This allows to use a proxy server. See
46
+ [ Got documentation] ( https://github.com/sindresorhus/got/tree/v11.8.6?tab=readme-ov-file#proxies )
47
+ for more details.
44
48
- ` apiVersion ` - Optional - A string to specify the [ Shopify API
45
49
version] [ api-versioning ] to use for requests. Defaults to the oldest supported
46
50
stable version.
@@ -53,6 +57,18 @@ Creates a new `Shopify` instance.
53
57
specifies a limit of 2 requests per second with a burst of 35 requests. When
54
58
set to ` true ` requests are limited as specified in the above example. Defaults
55
59
to ` false ` . Mutually exclusive with the ` maxRetries ` option.
60
+ - ` hooks ` - Optional - A list of ` got `
61
+ [ request hooks] ( https://github.com/sindresorhus/got/tree/v11.8.6#hooks ) to
62
+ attach to all outgoing requests, like ` beforeRetry ` , ` afterResponse ` , etc.
63
+ Hooks should be provided in the same format that Got expects them and will
64
+ receive the same arguments Got passes unchanged.
65
+ - ` maxRetries ` - Optional - The number of times to attempt to make the request
66
+ to Shopify before giving up. Defaults to ` 0 ` , which means no automatic
67
+ retries. If set to a value greater than ` 0 ` , ` shopify-api-node ` will make up
68
+ to that many retries. ` shopify-api-node ` will respect the ` Retry-After ` header
69
+ for requests to the REST API, and the throttled cost data for requests to the
70
+ GraphQL API, and retry the request after that time has elapsed. Mutually
71
+ exclusive with the ` autoLimit ` option.
56
72
- ` parseJson ` - Optional - The function used to parse JSON. The function is
57
73
passed a single argument. This option allows the use of a custom JSON parser
58
74
that might be needed to properly handle long integer IDs. Defaults to
@@ -66,22 +82,6 @@ Creates a new `Shopify` instance.
66
82
- ` timeout ` - Optional - The number of milliseconds before the request times
67
83
out. If the request takes longer than ` timeout ` , it will be aborted. Defaults
68
84
to ` 60000 ` , or 1 minute.
69
- - ` maxRetries ` - Optional - The number of times to attempt to make the request
70
- to Shopify before giving up. Defaults to ` 0 ` , which means no automatic
71
- retries. If set to a value greater than ` 0 ` , ` shopify-api-node ` will make up
72
- to that many retries. ` shopify-api-node ` will respect the ` Retry-After ` header
73
- for requests to the REST API, and the throttled cost data for requests to the
74
- GraphQL API, and retry the request after that time has elapsed. Mutually
75
- exclusive with the ` autoLimit ` option.
76
- - ` hooks ` - Optional - A list of ` got `
77
- [ request hooks] ( https://github.com/sindresorhus/got/tree/v11.8.6#hooks ) to
78
- attach to all outgoing requests, like ` beforeRetry ` , ` afterResponse ` , etc.
79
- Hooks should be provided in the same format that Got expects them and will
80
- receive the same arguments Got passes unchanged.
81
- - ` agent ` - Optional - An object that is passed as the ` agent ` option to ` got ` .
82
- This allows to use a proxy server. See
83
- [ Got documentation] ( https://github.com/sindresorhus/got/tree/v11.8.6?tab=readme-ov-file#proxies )
84
- for more details.
85
85
86
86
#### Return value
87
87
0 commit comments