reddit-wrapper-v2
Advanced tools
Comparing version 1.1.1 to 1.1.2
{ | ||
"name": "reddit-wrapper-v2", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "Simple Reddit API framework for nodejs. Replacing the no longer updated reddit-snooper. Relying more on promises rather than callbacks. Nicely handles multiple reddit errors.", | ||
@@ -5,0 +5,0 @@ "main": "reddit-wrapper.js", |
@@ -51,6 +51,6 @@ | ||
user_agent: 'user agent for your bot', | ||
retry_on_wait: true, // Default: false | ||
retry_on_server_error: 5, // Default: 0 | ||
retry_delay: 1, // Default: 5 seconds. | ||
logs: true // default: false | ||
retry_on_wait: true, | ||
retry_on_server_error: 5, | ||
retry_delay: 1, | ||
logs: true | ||
}) | ||
@@ -68,3 +68,3 @@ ``` | ||
| logs | False | Display logs. | False | | ||
| user_agent | Reddit-Snooper-V2 | The User Agent for all Reddit API requests. | False | | ||
| user_agent | Reddit-Watcher-V2 | The User Agent for all Reddit API requests. | False | | ||
| retry_on_wait | False | If True and Reddit returns a "You are trying this too much" error, it will pause the process for the exact time needed, then retry the request. | False | | ||
@@ -71,0 +71,0 @@ | retry_on_server_error | 0 | If > 0 and Reddit returns a server error (responseCode >= 500 && responseCode <= 599) it will retry the request the number of times you specify + 1 automatically. | False | |
@@ -5,3 +5,3 @@ var Api = require('./api'); | ||
// If user agent isn't defined, define it. | ||
options.user_agent = options.user_agent || "Reddit-Snooper-V2"; | ||
options.user_agent = options.user_agent || "Reddit-Watcher-V2"; | ||
@@ -8,0 +8,0 @@ const api = Api(options); |
29512