class DropboxApi::Metadata::MediaMetadata
Example of a serialized {MediaInfo} object:
“`json {
".tag": "video", "dimensions": { "height": 1500, "width": 1500 }, "location": { "latitude": 10.123456, "longitude": 5.123456 } "time_taken": "2016-09-04T17:00:27Z", "duration": 6000
} “`
Public Class Methods
new(data)
click to toggle source
# File lib/dropbox_api/metadata/media_metadata.rb, line 22 def new(data) tag = data['.tag'] class_for(tag.to_sym).new(data) end
Private Class Methods
class_for(tag)
click to toggle source
# File lib/dropbox_api/metadata/media_metadata.rb, line 29 def class_for(tag) case tag when :photo DropboxApi::Metadata::PhotoMetadata when :video DropboxApi::Metadata::VideoMetadata else raise ArgumentError, "Unable to build individual result with `#{tag}`" end end