You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 10, 2022. It is now read-only.
Create a new instance of the Netlify API client with the provided `accessToken`.
43
44
44
-
`accessToken` is optional. Without it, you can't make authorized requests.
45
+
`accessToken` is optional. Without it, you can't make authorized requests.
45
46
46
47
`opts` includes:
47
48
@@ -75,8 +76,8 @@ Every open-api method has the following signature:
75
76
Perform a call to the given endpoint corresponding with the `operationId`. Returns promise that will resolve with the body of the response, or reject with an error with details about the request attached. Rejects if the `status` > 400.
76
77
77
78
-`params` is an object that includes any of the required or optional endpoint parameters.
78
-
-`params.body` should be an object which gets serialized to JSON automatically. Any object can live here but refer to the open-api specification for allowed fields in a particular request body.
79
-
- If the endpoint accepts `binary`, `params.body` can be a Node.js readable stream or stream ctor (e.g. `() => fs.createReadStream('./foo')`). A Stream ctor function is required to support rate limit retry.
79
+
-`params.body` should be an object which gets serialized to JSON automatically. Any object can live here but refer to the open-api specification for allowed fields in a particular request body.
80
+
- If the endpoint accepts `binary`, `params.body` can be a Node.js readable stream or stream ctor (e.g. `() => fs.createReadStream('./foo')`). A Stream ctor function is required to support rate limit retry.
80
81
81
82
```js
82
83
// example params
@@ -105,7 +106,7 @@ Optional `opts` can include any property you want passed to `node-fetch`. The `h
105
106
All methods are conveniently consumed with async/await:
106
107
107
108
```js
108
-
asyncfunctiongetSomeData() {
109
+
asyncfunctiongetSomeData() {
109
110
// Calls may fail!
110
111
try {
111
112
returnawaitclient.getSiteDeploy({
@@ -141,7 +142,7 @@ See the [authenticating](https://www.netlify.com/docs/api/#authenticating) docs
0 commit comments