Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an extension to support the Account Activity API, primarily to support enhancements that were made to take the place of some of the capabilities of the (now sunset) Streaming API. It is not fully tested and is perhaps incomplete, so I'm not sure it's really ready to merge, but since I'm moving on to something else (see below), I wanted to contribute what I have.
This includes:
Support for environment names used with the Premium (and sandbox) version of the API. An empty environment name indicates the use of the Enterprise API (with somewhat different API URLs), although I have no way to test this.
New support for OAuth 2.0 bearer tokens used when listing and counting webhook subscriptions. This is done outside the OAuth library because the currently-referenced library has no support for bearer tokens (but see also Update to newer oauth library #257).
Code for calculating and sending a CRC response to a webhook challenge GET request
Removal of streaming example from README. Many API endpoints in
streaming.go
don't work, but some (particularly sampling and filtering tweets) still do, so I suspect that some of that code is still useful.Documentation and API URL updates
This pull request closes #254. I will be doing no further work on the Account Activity API because I just discovered that, unlike the Streaming API it is supposed to replace, it does not supply inbound home timeline tweets (only mentions, replies, likes, follows, etc.). I'm happy to answer any questions regarding the code, however.