Class: Skydrive::Photo

Inherits:
File show all
Defined in:
lib/skydrive/photo.rb

Overview

A user’s photo in SkyDrive.

Instance Attribute Summary

Attributes inherited from Object

#client, #object

Instance Method Summary collapse

Methods inherited from File

#comments_count, #comments_enabled?, #download, #download_link, #size, #source

Methods inherited from Object

#comment, #comments, #created_time, #delete, #description, #from, #id, #initialize, #is_embeddable?, #link, #name, #parent_id, #shared_with, #to_hash, #to_json, #type, #updated_time, #upload_location

Constructor Details

This class inherits a constructor from Skydrive::Object

Instance Method Details

#camera_makeString

The manufacturer of the camera that took the photo.

Returns:

  • (String)


56
57
58
# File 'lib/skydrive/photo.rb', line 56

def camera_make
  object["camera_make"]
end

#camera_modelString

The brand and model number of the camera that took the photo.

Returns:

  • (String)


62
63
64
# File 'lib/skydrive/photo.rb', line 62

def camera_model
  object["camera_model"]
end

#exposure_denominatorInteger

The denominator of the shutter speed that the photo was taken at

Returns:

  • (Integer)


86
87
88
# File 'lib/skydrive/photo.rb', line 86

def exposure_denominator
  object["exposure_denominator"]
end

#exposure_numeratorInteger

The numerator of the shutter speed that the photo was taken at

Returns:

  • (Integer)


80
81
82
# File 'lib/skydrive/photo.rb', line 80

def exposure_numerator
  object["exposure_numerator"]
end

#focal_lengthFloat

The focal length that the photo was taken at

Returns:

  • (Float)


74
75
76
# File 'lib/skydrive/photo.rb', line 74

def focal_length
  object["focal_length"]
end

#focal_ratioFloat

The f-number that the photo was taken at

Returns:

  • (Float)


68
69
70
# File 'lib/skydrive/photo.rb', line 68

def focal_ratio
  object["focal_ratio"]
end

#heightInteger

Height of the photo in pixels

Returns:

  • (Integer)


38
39
40
# File 'lib/skydrive/photo.rb', line 38

def height
  object["height"]
end

#imagesArray<Hash>

Info about various sizes of the photos

Returns:

  • (Array<Hash>)


26
27
28
# File 'lib/skydrive/photo.rb', line 26

def images
  object["images"]
end

#locationHash

The location where the photo was taken.

Returns:

  • (Hash)


50
51
52
# File 'lib/skydrive/photo.rb', line 50

def location
  object["location"]
end

#pictureString

A URL of the photo’s picture.

Returns:

  • (String)


20
21
22
# File 'lib/skydrive/photo.rb', line 20

def picture
  object["picture"]
end

#tags_countInteger

The number of tags on the photo

Returns:

  • (Integer)


7
8
9
# File 'lib/skydrive/photo.rb', line 7

def tags_count
  object["tags_count"]
end

#tags_enabled?Integer

Whether tags are enabled for the photo

Returns:

  • (Integer)


13
14
15
# File 'lib/skydrive/photo.rb', line 13

def tags_enabled?
  object["tags_enabled"]
end

#when_takenTime

Time when the photo was taken

Returns:

  • (Time)


32
33
34
# File 'lib/skydrive/photo.rb', line 32

def when_taken
  Time.new object["when_taken"] if object["when_taken"]
end

#widthInteger

Width of the photo in pixels

Returns:

  • (Integer)


44
45
46
# File 'lib/skydrive/photo.rb', line 44

def width
  object["width"]
end