Skip to content

Commit

Permalink
doc: bumped version & changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
alkihis committed Mar 19, 2022
1 parent b75dd9f commit ce92922
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
6 changes: 6 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
1.11.1
------
- Feat: Support error hooks in plugins #226 #227
- Fix: Bypass Twitter v2 incoherence by converting `start_time` to a valid `since_id` when `until_id` is used in paginators #197 #228
- Feat: Getter for DM images `.v1.downloadDmImage` to download images hosted on `ton.twitter.com` protected by OAuth 1.0a

1.11.0
------
- Feat: Support plugins (more features coming soon as plugins!)
Expand Down
7 changes: 7 additions & 0 deletions doc/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ interface ITwitterApiClientPlugin {
onBeforeRequest?: TTwitterApiBeforeRequestHook
/* Executed when a request succeeds (failed requests don't trigger this hook). */
onAfterRequest?: TTwitterApiAfterRequestHook
// Error handling in classic requests
/* Executed when Twitter doesn't reply (network error, server disconnect). */
onRequestError?: TTwitterApiRequestErrorHook
/* Executed when Twitter reply but with an error? */
onResponseError?: TTwitterApiResponseErrorHook
// Stream requests
/* Executed when a stream request is about to be prepared. This method **can't** return a `Promise`. */
onBeforeStreamRequestConfig?: TTwitterApiBeforeStreamRequestConfigHook
Expand All @@ -46,6 +51,8 @@ Method types:
type TTwitterApiBeforeRequestConfigHook = (args: ITwitterApiBeforeRequestConfigHookArgs) => PromiseOrType<TwitterResponse<any> | void>
type TTwitterApiBeforeRequestHook = (args: ITwitterApiBeforeRequestHookArgs) => void | Promise<void>
type TTwitterApiAfterRequestHook = (args: ITwitterApiAfterRequestHookArgs) => void | Promise<void>
type TTwitterApiRequestErrorHook = (args: ITwitterApiRequestErrorHookArgs) => void | Promise<void>
type TTwitterApiResponseErrorHook = (args: ITwitterApiResponseErrorHookArgs) => void | Promise<void>
type TTwitterApiBeforeStreamRequestConfigHook = (args: ITwitterApiBeforeRequestConfigHookArgs) => void
type TTwitterApiAfterOAuth1RequestTokenHook = (args: ITwitterApiAfterOAuth1RequestTokenHookArgs) => void | Promise<void>
type TTwitterApiAfterOAuth2RequestTokenHook = (args: ITwitterApiAfterOAuth2RequestTokenHookArgs) => void | Promise<void>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "twitter-api-v2",
"version": "1.11.0",
"version": "1.11.1",
"description": "Strongly typed, full-featured, light, versatile yet powerful Twitter API v1.1 and v2 client for Node.js.",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down

0 comments on commit ce92922

Please sign in to comment.