Flickrex.Upload (flickrex v0.8.1) View Source
Operations on Flickr Upload Service.
Examples
Upload a photo:
{:ok, resp} =
"path/to/photo.png"
|> Flickrex.Upload.upload(is_public: 0)
|> Flickrex.request()
resp.body #=> %{"photoid" => %{"_content" => "99999999999"}, "stat" => "ok"}Replace a photo:
{:ok, resp} =
"path/to/replace/photo.png"
|> Flickrex.Upload.replace("99999999999")
|> Flickrex.request()
resp.body #=> %{"photoid" => %{"_content" => "99999999999", ...}, "stat" => "ok"} Link to this section Summary
Link to this section Types
Specs
opts() :: Keyword.t(String.Chars.t())
Options for a Flickr Upload API call
Specs
photo() :: Path.t()
A file path for a photo
Specs
photo_id() :: String.t()
A Flickr photo ID
Link to this section Functions
Specs
replace(photo(), photo_id(), opts()) :: Flickrex.Operation.Upload.t()
Replaces a photo on Flickr.
This method requires authentication with 'write' permission.
Options
async- Set to 1 to use asynchronous uploading. The response will include aticketid. SeeFlickrex.Flickr.Photos.Upload.check_tickets/2.
Specs
upload(photo(), opts()) :: Flickrex.Operation.Upload.t()
Uploads a photo to Flickr.
This method requires authentication with 'write' permission.
Options
title- The title of the photo.description- A description of the photo. May contain some limited HTML.tags- A space-seperated list of tags to apply to the photo.is_public,is_friend,is_family- Set to 0 for no, 1 for yes. Specifies who can view the photo. If omitted permissions will be set to user's defaultsafety_level- Set to 1 for Safe, 2 for Moderate, or 3 for Restricted. If omitted or an invalid value is passed, will be set to user's defaultcontent_type- Set to 1 for Photo, 2 for Screenshot, or 3 for Other. If omitted, will be set to user's defaulthidden- Set to 1 to keep the photo in global search results, 2 to hide from public searches. If omitted, will be set based to user's defaultasync- Set to 1 to use asynchronous uploading. The response will include aticketid. SeeFlickrex.Flickr.Photos.Upload.check_tickets/2.