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
+14-1Lines changed: 14 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -135,13 +135,26 @@ Batchelor.add({
135
135
```
136
136
This could be required, for example, when making multiple requests with different Auth data and then needing to make further requests with the same Auth data.
137
137
138
+
###### Resetting and Re-using
139
+
Once Batchelor has been run, there are certain use-cases for running futher batch requests on response. This requires the variables in the module to be reset. This can be done using the `.reset()` call:
140
+
```node
141
+
Batchelor.run(function(response){
142
+
143
+
// Reset Batchelor for further use
144
+
Batchelor.reset();
145
+
...
146
+
147
+
});
148
+
```
149
+
138
150
## To Do List-ish
139
151
These might get done if we end up needing them/have time:
140
152
* Limit requests per batch request
141
-
* Handle Media in API calls (no need for it here, feel free)
153
+
* Handle Media in API calls (no need for it here, feel free to write it)
142
154
143
155
## Release History
144
156
157
+
* 0.0.7 Reset function for when you are using batchelor more than once in a script (ability for nested requests too)
145
158
* 0.0.6 Bug fixes introduced in the last update and clean up was happening too soon. Moved it.
146
159
* 0.0.5 Added the ability to passthrough specific information from the `.add()` options to the response object
147
160
* 0.0.4 Authorization can now be set on each request (currently Bearer [...] only)
0 commit comments