Releases: xdevplatform/autohook
v1.7.2
This version contains a few improvements:
- The built-in Ngrok server stops after a while if an auth token is not provided. You can now specify a token to your Ngrok account to keep the built-in server connected indefinitely. This fixed #37 (thank you @sachushaji!)
- Enforces code style via ESLint.
v1.7.1
This release fixed a bug where an unused import would cause an error if the module is not installed.
Thank you @leocabeza for reporting and fixing.
v1.7.0
v1.6.0
Up until now, Autohook would manage all your webhooks at once, which is not always the case for Account Activity API developers with a paid subscription.
This version contains a few new methods to help manage your webhooks individually.
removeWebhook
will accept a webhook item as defined from the Twitter GET webhooks payload. The webhook will be removed if it exists.setWebhook
is equivalent tostart
when called with a URL argument.getWebhooks
returns the list of webhooks as defined in the Twitter GET webhooks payload.
v1.5.0
This versions contains under-the-hood improvements. We replaced the underlying HTTP library (deprecated) with a supported version, and removed a few dependencies.
What's new in this version
- Removed dependencies on OAuth 1.0a modules. Bearer tokens and OAuth signatures are generated by two first-party modules
- Wraps the HTTP library in a middleware layer to handle authentication, and to provide convenience methods for GET, POST, PUT, DELETE requests
- Throws errors from a common handling logic to capture error conditions common to all endpoints
- Adds test coverage for all the main components
What's fixed
- Replaces the deprecated request package with needle (Issue #19)
- When imported as a module, Autohook no loger terminates via
process.exit(-1)
upon error.
v1.4.2
This version fixes a few issues.
What's new in this version
- It fixes an issue where the URL module wasn't correctly imported.
- It fixes an issue where an unfriendly exception trace was printed out instead of a human readable error message.
- Expands test coverage to
TooManySubscriptionsError
.
v1.4.1
This version adds better ways to get the detail of an error.
What's new in this version
TwitterError
now exposes a new property namedcode
. This property is filled with the Twitter error code coming from the Account Activity API, if available in the original error response. If nocode
is available, the property will default to-1
(unknown error).- As with any JavaScript
Error
,TwitterError
makes available amessage
property containing the description of the error as available tostderr
, minus the stack trace.
v1.4.0
This version adds a way to unsubscribe from a user's account activities.
What's new in this version
- A new
unsubscribe()
method that accepts a user ID. When called,unsubscribe()
will delete an existing subscription to a user's account activity. It will throw an exception if the user ID is not valid or if the subscription cannot be found.
v1.3.0
This version provides an easier way to setup a standalone server. It also fixes a few issues.
What's new in this version
-
validateWebhook()
always assumed you had a Node.js HTTP server running, and sent the CRC response directly to that server. Because it may not always be the case, we changed it to just return a CRC signature, which you can then send with your favorite server. -
Breaking: You don't need to call the standalone
setWebhook()
if you already have a webhook. Just callAutohook.start(WEBHOOK_URL)
instead. As a result, we madesetWebhook()
private. Check out the standalone server test to see how to change your current implementation.
What's fixed
- Sometimes Twitter does not return rate limit information in the headers.
RateLimitError
now accounts for this.
v1.2.2
This version is the same as v1.2.1. It just adds the Github project URL to the package manifest.