Class: Daylife::Image

Inherits:
API
  • Object
show all
Defined in:
lib/daylife/image.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from API

auth, get, #initialize, methodize

Constructor Details

This class inherits a constructor from Daylife::API

Instance Attribute Details

#captionObject

Returns the value of attribute caption.



3
4
5
# File 'lib/daylife/image.rb', line 3

def caption
  @caption
end

#creditObject

Returns the value of attribute credit.



3
4
5
# File 'lib/daylife/image.rb', line 3

def credit
  @credit
end

#daylife_urlObject

Returns the value of attribute daylife_url.



3
4
5
# File 'lib/daylife/image.rb', line 3

def daylife_url
  @daylife_url
end

#heightObject

Returns the value of attribute height.



3
4
5
# File 'lib/daylife/image.rb', line 3

def height
  @height
end

#image_idObject

Returns the value of attribute image_id.



3
4
5
# File 'lib/daylife/image.rb', line 3

def image_id
  @image_id
end

#sourceObject

Returns the value of attribute source.



3
4
5
# File 'lib/daylife/image.rb', line 3

def source
  @source
end

#thumb_urlObject

Returns the value of attribute thumb_url.



3
4
5
# File 'lib/daylife/image.rb', line 3

def thumb_url
  @thumb_url
end

#timestampObject

Returns the value of attribute timestamp.



3
4
5
# File 'lib/daylife/image.rb', line 3

def timestamp
  @timestamp
end

#urlObject

Returns the value of attribute url.



3
4
5
# File 'lib/daylife/image.rb', line 3

def url
  @url
end

#widthObject

Returns the value of attribute width.



3
4
5
# File 'lib/daylife/image.rb', line 3

def width
  @width
end

Class Method Details

.core_identifierObject



5
6
7
# File 'lib/daylife/image.rb', line 5

def self.core_identifier
  return :image_id
end

.get_info(image_id, parameters = {}) ⇒ Object

This function returns basic information about a given image.



10
11
12
# File 'lib/daylife/image.rb', line 10

def self.get_info(image_id, parameters={})
  get :get_info, parameters.merge(:image_id => image_id)
end

This method is used to retrieve topics that are related to the given image.



15
16
17
# File 'lib/daylife/image.rb', line 15

def self.get_related_topics(image_id, parameters={})
  get :get_related_topics, parameters.merge(:image_id => image_id)
end