Class Fleakr::Objects::Photo
In: lib/fleakr/objects/photo.rb
Parent: Object

Photo

Handles both the retrieval of Photo objects from various associations (e.g. User / Set) as well as the ability to upload images to the Flickr site.

Attributes

id
The ID for this photo
title
The title of this photo
description
The description of this photo
secret
This photo‘s secret (used for sharing photo without permissions checking)
comment_count
Count of the comments attached to this photo
url
This photo‘s page on Flickr
square
The tiny square representation of this photo
thumbnail
The thumbnail for this photo
small
The small representation of this photo
medium
The medium representation of this photo
large
The large representation of this photo
original
The original photo

Associations

images
The underlying images for this photo.

Methods

Included Modules

Fleakr::Support::Object

Constants

SIZES = [:square, :thumbnail, :small, :medium, :large, :original]   Available sizes for this photo

Public Class methods

Upload the photo specified by filename to the user‘s Flickr account. When uploading, there are several options available (none are required):

:title
The title for this photo. Any string is allowed.
:description
The description for this photo. Any string is allowed.
:tags
A collection of tags for this photo. This can be a string or array of strings.
:viewable_by
Who can view this photo? Acceptable values are one of :everyone, :friends or :family. This can also take an array of values (e.g. [:friends, :family]) to make it viewable by friends and family.
:level
The safety level of this photo. Acceptable values are one of :safe, :moderate, or :restricted.
:type
The type of image this is. Acceptable values are one of :photo, :screenshot, or :other.
:hide?
Should this photo be hidden from public searches? Takes a boolean.

Public Instance methods

When was this photo posted?

Replace the current photo‘s image with the one specified by filename. This call requires authentication.

When was this photo taken?

When was this photo last updated? This includes addition of tags and other metadata.

[Validate]