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
Copy file name to clipboardExpand all lines: README.md
+24-23Lines changed: 24 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,29 +60,9 @@ TOKEN=[TOKEN VALUE GOES HERE] node test.js
60
60
61
61
Take a look at [https://github.com/dnsimple/hello-domains-node](https://github.com/dnsimple/hello-domains-node) for an example app that authorizes via OAuth and displays your domain list.
62
62
63
-
## Pagination
64
-
65
-
There are helper submethods available on API methods that are paginated to assist with fetching items across all pages.
66
-
67
-
For an API that returns a `paginate` property, you can use either the `iterateAll` or `collectAll` submethods:
68
-
69
-
-**iterateAll**: return an asynchronous iterator of items that are returned from the API. When the last item on a page is iterated, the next page will be fetched. This continues until there are no more pages.
70
-
71
-
-**collectAll**: fetch all pages and collect all the items in order into an array.
We highly recommend testing against our [sandbox environment](https://developer.dnsimple.com/sandbox/) before using our production environment. This will allow you to avoid real purchases, live charges on your credit card, and reduce the chance of your running up against rate limits.
88
68
@@ -98,7 +78,7 @@ const client = new DNSimple({
98
78
99
79
You will need to ensure that you are using an access token created in the sandbox environment. Production tokens will *not* work in the sandbox environment.
100
80
101
-
## Setting a custom `User-Agent` header
81
+
###Setting a custom `User-Agent` header
102
82
103
83
You customize the `User-Agent` header for the calls made to the DNSimple API:
104
84
@@ -112,6 +92,27 @@ const client = new DNSimple({
112
92
113
93
The value you provide will be appended to the default `User-Agent` the client uses. For example, if you use `my-app`, the final header value will be `dnsimple-node/x.x.x my-app` (note that it will vary depending on the client version).
114
94
95
+
## Pagination
96
+
97
+
There are helper submethods available on API methods that are paginated to assist with fetching items across all pages.
98
+
99
+
For an API that returns a `paginate` property, you can use either the `iterateAll` or `collectAll` submethods:
100
+
101
+
-**iterateAll**: return an asynchronous iterator of items that are returned from the API. When the last item on a page is iterated, the next page will be fetched. This continues until there are no more pages.
102
+
103
+
-**collectAll**: fetch all pages and collect all the items in order into an array.
0 commit comments