diff --git a/doc/v1.md b/doc/v1.md index 8adf179..3f8d166 100644 --- a/doc/v1.md +++ b/doc/v1.md @@ -1042,6 +1042,7 @@ you **must** specify the file type using `options.type`. - `options.shared` Specify `true` here if you want to use this media in Welcome Direct Messages. - `options.additionalOwners` List of user IDs (except you) allowed to use the new media ID. - `options.maxConcurrentUploads` Number of concurrent chunk uploads allowed to be sent. Defaults to `3`. +- `returnFullMediadata` If set to true, returns the whole media information instead of just the media_id. **Returns**: `string`: Media ID to give to tweets/DMs diff --git a/src/v1/client.v1.write.ts b/src/v1/client.v1.write.ts index 44d5348..d00ecac 100644 --- a/src/v1/client.v1.write.ts +++ b/src/v1/client.v1.write.ts @@ -341,6 +341,8 @@ export default class TwitterApiv1ReadWrite extends TwitterApiv1ReadOnly { * * @param returnFullMediaData If set to true, returns the whole media information instead of just the media_id */ + public async uploadMedia(file: TUploadableMedia, options: Partial, returnFullMediaData: true): Promise; + public async uploadMedia(file: TUploadableMedia, options?: Partial): Promise; public async uploadMedia(file: TUploadableMedia, options: Partial = {}, returnFullMediaData = false) { const chunkLength = options.chunkLength ?? (1024 * 1024);