1.11.0 - Plugins
- Feat: Support plugins (more features coming soon as plugins!)
- Feat: Compression level can now be specified explicitly
- Refactor:
.v1.uploadMedia()
now acceptoptions.mimeType
andoptions.longVideo
as argument, in replacement ofoptions.type
- Fix: OAuth2 scope incorrectly encoded #184
BREAKING CHANGES:
settings.disableCompression
(client settings on instantiation) is nowsettings.compression
to allow more precise settingsclient.send
andclient.sendStream
are now private methods. Migrate to HTTP methods.get
/.post
/.getStream
/...
DEPRECATIONS:
-
.v1.uploadMedia()
argumentoptions.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 changetype
tomimeType
: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