Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the Contents API client for downloading file attachments. Webex file attachment URLs (returned in Message.Files) point to GET /v1/contents/{contentId} which requires Bearer token auth.
func (*Client) Download ¶
Download fetches a file attachment by its content ID. The contentID is the Webex content identifier (the base64-encoded ID found at the end of URLs like https://webexapis.com/v1/contents/{contentId}).
func (*Client) DownloadFromURL ¶
DownloadFromURL fetches a file attachment from a full Webex content URL. This accepts the URLs directly from Message.Files (e.g., "https://webexapis.com/v1/contents/Y2lzY29...").
type FileInfo ¶
type FileInfo struct {
// ContentType is the MIME type of the file (e.g., "image/png", "application/pdf").
ContentType string
// ContentDisposition contains the original filename from the server (e.g., "attachment; filename=\"report.pdf\"").
ContentDisposition string
// ContentLength is the size in bytes (-1 if unknown).
ContentLength int64
// Data is the raw file content.
Data []byte
}
FileInfo holds metadata about a downloaded file attachment.