Skip to content

Releases: plhery/node-twitter-api-v2

1.11.0 - Plugins

16 Feb 20:35

Choose a tag to compare

  • Feat: Support plugins (more features coming soon as plugins!)
  • Feat: Compression level can now be specified explicitly
  • Refactor: .v1.uploadMedia() now accept options.mimeType and options.longVideo as argument, in replacement of options.type
  • Fix: OAuth2 scope incorrectly encoded #184

BREAKING CHANGES:

  • settings.disableCompression (client settings on instantiation) is now settings.compression to allow more precise settings
  • client.send and client.sendStream are now private methods. Migrate to HTTP methods .get/.post/.getStream/...

DEPRECATIONS:

  • .v1.uploadMedia() argument options.type in now deprecated. Migration details available in v1 endpoint documentation of .uploadMedia.
    Migrate:

    await client.v1.uploadMedia(fs.openSync(jpgImg, 'r'), { type: 'jpg' })
    // - becomes -
    import { EUploadMimeType } from 'twitter-api-v2'
    await client.v1.uploadMedia(fs.openSync(jpgImg, 'r'), { mimeType: EUploadMimeType.Jpeg })

    if you're already using real MIME type in type, just change type to mimeType:

    await client.v1.uploadMedia(fs.openSync(jpgImg, 'r'), { type: 'image/jpeg' })
    // - becomes -
    await client.v1.uploadMedia(fs.openSync(jpgImg, 'r'), { mimeType: 'image/jpeg' })
  • Rate limit client methods .hasHitRateLimit/.isRateLimitStatusObsolete/.getLastRateLimitStatus are now deprecated. Migrate to plugin @twitter-api-v2/plugin-rate-limit

1.10.3

11 Feb 19:31

Choose a tag to compare

Extends the 1.10.2 release to brotli compression (for regular endpoints) and gzip compression (for streaming endpoints).

  • Feat: Native support of gzip compression for streaming endpoints
  • Feat: Native support of brotli (25% more compressed than gzip) compression for non-streaming endpoints, when available

1.10.2

11 Feb 15:08

Choose a tag to compare

  • Feat: Native support of gzip/deflate compression for regular endpoints (streaming excluded)

1.10.1

11 Feb 12:18

Choose a tag to compare

1.10.1

  • Fix: Crash when a v2 paginator is empty and response does not contains a .meta property #177
  • Fix: "Memory leak" when response are abruptly closed by Twitter or OS, because no close/error listener on response object was attributed

1.10.0

27 Jan 12:37

Choose a tag to compare

  • Feat: Pagination support for tweets/:id/liking_users and tweets/:id/retweeted_by #165
  • Feat: Support custom Node HTTP agents #149
  • Doc: Better example for .v2.me() and fix typos #160 #164 (thanks to @rbochenek and @ShubhamKushwah)

1.9.1

10 Jan 16:57

Choose a tag to compare

  • Fix: Use next_token instead of until_id if pagination token available #152

1.9.0 - v2 includes helpers

05 Jan 21:00

Choose a tag to compare

  • Feat: Helpers for v2 includes
  • Feat: Support for custom debug loggers
  • Fix: Errors accessor to get API errors in paginators #145
  • Fix: Correctly update .includes/.meta/.errors in paginators when using async iterator #142
  • Fix: Incorrect HTTP method for GET lists #147 #148
  • Doc: Better doc & examples for OAuth 2.0 user-context

1.8.1 - GET lists v2

03 Jan 20:36

Choose a tag to compare

  • Feat: Add every GET lists v2 endpoints

1.8.0 - OAuth2 user-context

19 Dec 19:58

Choose a tag to compare

  • Feat: Add OAuth2 user-context support
  • Feat: Add users/me v2 endpoint wrapper

1.7.2 - Fix paginators for-await-of

08 Dec 16:51

Choose a tag to compare

  • Fix: Paginator can return multiple times the same results in some conditions
  • Feat: .done property for paginators, to know when a next page is fetchable