ttezel / twit

Twitter API Client for node (REST & Streaming API)
4.31k stars 570 forks source link

Add support for subtitles create and delete #506

Open dyep49 opened 5 years ago

dyep49 commented 5 years ago

As of late May, users can create and delete subtitles via the Twitter API.

https://developer.twitter.com/en/docs/media/upload-media/api-reference/post-media-subtitles-create https://developer.twitter.com/en/docs/media/upload-media/api-reference/post-media-subtitles-delete

These endpoints require passing a JSON payload. To allow twit to support these endpoints, the subtitle endpoints need to be added to the JSONPAYLOAD_PATHS variable in twitter.js. In addition, to upload subtitles via the chunked media upload, the media_category must be set to "SUBTITLES".