Skip to content

Commit

Permalink
docs: Added examples for WPP.chat.downloadMedia (#956)
Browse files Browse the repository at this point in the history
  • Loading branch information
edgardmessias committed Mar 29, 2023
1 parent f5a3bb9 commit 764a45d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/chat/functions/downloadMedia.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ import { getMessageById } from '.';
/**
* Download the blob of a media message
*
* ```javascript
* // Get a blob file
* await WPP.chat.downloadMedia('true_[number]@c.us_ABCDEF');
*
* // Get a base64Content
* await WPP.chat.downloadMedia('true_[number]@c.us_ABCDEF').then(WPP.util.blobToBase64);
* ```
*
* @category Message
*/
export async function downloadMedia(id: string): Promise<Blob> {
Expand Down

0 comments on commit 764a45d

Please sign in to comment.