Appearance
@line/bot-sdk / messagingApi / MessagingApiBlobClient
Class: MessagingApiBlobClient
Defined in: lib/messaging-api/api/messagingApiBlobClient.ts:50
See
LineBotClient for a unified interface that wraps this client.
Constructors
Constructor
new MessagingApiBlobClient(
config):MessagingApiBlobClient
Defined in: lib/messaging-api/api/messagingApiBlobClient.ts:66
Initializes a new MessagingApiBlobClient.
Parameters
config
httpClientConfig
Configuration for this API client.
Returns
MessagingApiBlobClient
Example
ts
const client = new MessagingApiBlobClient({
channelAccessToken: process.env.LINE_CHANNEL_ACCESS_TOKEN!,
});Methods
getMessageContent()
getMessageContent(
messageId):Promise<Readable>
Defined in: lib/messaging-api/api/messagingApiBlobClient.ts:85
Download image, video, and audio data sent from users. Calls GET https://api-data.line.me/v2/bot/message/{messageId}/content. To inspect the HTTP status code or response headers, use getMessageContentWithHttpInfo.
Parameters
messageId
string
Message ID of video or audio
Returns
Promise<Readable>
A promise resolving to the response body.
See
getMessageContentPreview()
getMessageContentPreview(
messageId):Promise<Readable>
Defined in: lib/messaging-api/api/messagingApiBlobClient.ts:118
Get a preview image of the image or video Calls GET https://api-data.line.me/v2/bot/message/{messageId}/content/preview. To inspect the HTTP status code or response headers, use getMessageContentPreviewWithHttpInfo.
Parameters
messageId
string
Message ID of image or video
Returns
Promise<Readable>
A promise resolving to the response body.
See
getMessageContentPreviewWithHttpInfo()
getMessageContentPreviewWithHttpInfo(
messageId):Promise<ApiResponseType<Readable>>
Defined in: lib/messaging-api/api/messagingApiBlobClient.ts:130
Get a preview image of the image or video Calls GET https://api-data.line.me/v2/bot/message/{messageId}/content/preview. This method returns the response body together with the underlying httpResponse.
Parameters
messageId
string
Message ID of image or video
Returns
Promise<ApiResponseType<Readable>>
A promise resolving to the response body together with the underlying httpResponse.
See
getMessageContentTranscodingByMessageId()
getMessageContentTranscodingByMessageId(
messageId):Promise<GetMessageContentTranscodingResponse>
Defined in: lib/messaging-api/api/messagingApiBlobClient.ts:154
Verify the preparation status of a video or audio for getting Calls GET https://api-data.line.me/v2/bot/message/{messageId}/content/transcoding. To inspect the HTTP status code or response headers, use getMessageContentTranscodingByMessageIdWithHttpInfo.
Parameters
messageId
string
Message ID of video or audio
Returns
Promise<GetMessageContentTranscodingResponse>
A promise resolving to the response body.
See
getMessageContentTranscodingByMessageIdWithHttpInfo()
getMessageContentTranscodingByMessageIdWithHttpInfo(
messageId):Promise<ApiResponseType<GetMessageContentTranscodingResponse>>
Defined in: lib/messaging-api/api/messagingApiBlobClient.ts:170
Verify the preparation status of a video or audio for getting Calls GET https://api-data.line.me/v2/bot/message/{messageId}/content/transcoding. This method returns the response body together with the underlying httpResponse.
Parameters
messageId
string
Message ID of video or audio
Returns
Promise<ApiResponseType<GetMessageContentTranscodingResponse>>
A promise resolving to the response body together with the underlying httpResponse.
See
getMessageContentWithHttpInfo()
getMessageContentWithHttpInfo(
messageId):Promise<ApiResponseType<Readable>>
Defined in: lib/messaging-api/api/messagingApiBlobClient.ts:97
Download image, video, and audio data sent from users. Calls GET https://api-data.line.me/v2/bot/message/{messageId}/content. This method returns the response body together with the underlying httpResponse.
Parameters
messageId
string
Message ID of video or audio
Returns
Promise<ApiResponseType<Readable>>
A promise resolving to the response body together with the underlying httpResponse.
See
getRichMenuImage()
getRichMenuImage(
richMenuId):Promise<Readable>
Defined in: lib/messaging-api/api/messagingApiBlobClient.ts:193
Download rich menu image. Calls GET https://api-data.line.me/v2/bot/richmenu/{richMenuId}/content. To inspect the HTTP status code or response headers, use getRichMenuImageWithHttpInfo.
Parameters
richMenuId
string
ID of the rich menu with the image to be downloaded
Returns
Promise<Readable>
A promise resolving to the response body.
See
getRichMenuImageWithHttpInfo()
getRichMenuImageWithHttpInfo(
richMenuId):Promise<ApiResponseType<Readable>>
Defined in: lib/messaging-api/api/messagingApiBlobClient.ts:205
Download rich menu image. Calls GET https://api-data.line.me/v2/bot/richmenu/{richMenuId}/content. This method returns the response body together with the underlying httpResponse.
Parameters
richMenuId
string
ID of the rich menu with the image to be downloaded
Returns
Promise<ApiResponseType<Readable>>
A promise resolving to the response body together with the underlying httpResponse.
See
setRichMenuImage()
setRichMenuImage(
richMenuId,body):Promise<MessageAPIResponseBase>
Defined in: lib/messaging-api/api/messagingApiBlobClient.ts:227
Upload rich menu image Calls POST https://api-data.line.me/v2/bot/richmenu/{richMenuId}/content. To inspect the HTTP status code or response headers, use setRichMenuImageWithHttpInfo.
Parameters
richMenuId
string
The ID of the rich menu to attach the image to
body
Blob
Returns
Promise<MessageAPIResponseBase>
A promise resolving to the response body.
See
setRichMenuImageWithHttpInfo()
setRichMenuImageWithHttpInfo(
richMenuId,body):Promise<ApiResponseType<MessageAPIResponseBase>>
Defined in: lib/messaging-api/api/messagingApiBlobClient.ts:243
Upload rich menu image Calls POST https://api-data.line.me/v2/bot/richmenu/{richMenuId}/content. This method returns the response body together with the underlying httpResponse.
Parameters
richMenuId
string
The ID of the rich menu to attach the image to
body
Blob
Returns
Promise<ApiResponseType<MessageAPIResponseBase>>
A promise resolving to the response body together with the underlying httpResponse.