Class: DropboxApi::Metadata::MediaMetadata

Inherits:
Base
  • Object
show all
Defined in:
lib/dropbox_api/metadata/media_metadata.rb

Overview

Example of a serialized MediaInfo object:

{
  ".tag": "video",
  "dimensions": {
    "height": 1500,
    "width": 1500
  },
  "location": {
    "latitude": 10.123456,
    "longitude": 5.123456
  }
  "time_taken": "2016-09-04T17:00:27Z",
  "duration": 6000
}

Class Method Summary collapse

Methods inherited from Base

field, #initialize, #serialized_field, #to_hash

Constructor Details

This class inherits a constructor from DropboxApi::Metadata::Base

Class Method Details

.new(data) ⇒ Object


21
22
23
24
# File 'lib/dropbox_api/metadata/media_metadata.rb', line 21

def new(data)
  tag = data['.tag']
  class_for(tag.to_sym).new(data)
end