hunter v0.5.1 Hunter.Attachment View Source
Attachment entity
This module defines a Hunter.Attachment struct and the main functions
for working with Attachments.
Fields
id- ID of the attachmenttype- One of: "image", "video", "gifv", "unknown"url- URL of the locally hosted version of the imageremote_url- For remote images, the remote URL of the original imagepreview_url- URL of the preview imagetext_url- Shorter URL for the image, for insertion into text (only present on local images)meta- May contain subtresssmallandoriginal. Images may contain:width,height,size,aspect, while videos (includinggifv) may contain:width,height,frame_rate,duration, andbitrate.description- attachment description
Note: When the type is "unknown", it is likely only remote_url is
available and local url is missing
Link to this section Summary
Functions
Upload a media attachment
Link to this section Types
Link to this section Functions
Link to this function
upload_media(conn, file, options \\ [])
View Source
upload_media(conn, file, options \\ [])
View Source
upload_media(Hunter.Client.t(), Path.t(), Keyword.t()) :: Hunter.Attachment.t()
upload_media(Hunter.Client.t(), Path.t(), Keyword.t()) :: Hunter.Attachment.t()
Upload a media attachment
Parameters
conn- connection credentialsfile- media to be uploadedoptions- option list
Options
description- plain-text description of the media for accessibility (max 420 chars)focus- two floating points, comma-delimited.