Sha256: dd7220975ec77e9f134d4bf81fc28fe5c7e86b8585b55143b771a25334cf55d6

Contents?: true

Size: 1.04 KB

Versions: 2

Compression:

Stored size: 1.04 KB

Contents

module DropboxApi::Metadata
  # Example of a serialized {File} object:
  #
  # ```json
  # {
  #   ".tag": "file",
  #   "name": "Prime_Numbers.txt",
  #   "path_lower": "/homework/math/prime_numbers.txt",
  #   "path_display": "/Homework/math/Prime_Numbers.txt",
  #   "id": "id:a4ayc_80_OEAAAAAAAAAXw",
  #   "client_modified": "2015-05-12T15:50:38Z",
  #   "server_modified": "2015-05-12T15:50:38Z",
  #   "rev": "a1c10ce0dd78",
  #   "size": 7212,
  #   "sharing_info": {
  #     "read_only": true,
  #     "parent_shared_folder_id": "84528192421",
  #     "modified_by": "dbid:AAH4f99T0taONIb-OurWxbNQ6ywGRopQngc"
  #   }
  # }
  # ```
  class File < Base
    field :name, String
    field :path_lower, String
    field :path_display, String
    field :id, String
    field :client_modified, Time
    field :server_modified, Time
    field :rev, String
    field :size, Integer
    field :content_hash, String, :optional
    field :media_info, DropboxApi::Metadata::MediaInfo, :optional

    def to_hash
      super.merge(".tag" => "file")
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dropbox_api-0.1.12 lib/dropbox_api/metadata/file.rb
dropbox_api-0.1.11 lib/dropbox_api/metadata/file.rb