Class: YourImageShare::ListResult

Inherits:
Struct
  • Object
show all
Defined in:
lib/yourimageshare/types.rb

Overview

Response shape for #list.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#dataObject

Returns the value of attribute data

Returns:

  • (Object)

    the current value of data



28
29
30
# File 'lib/yourimageshare/types.rb', line 28

def data
  @data
end

#metaObject

Returns the value of attribute meta

Returns:

  • (Object)

    the current value of meta



28
29
30
# File 'lib/yourimageshare/types.rb', line 28

def meta
  @meta
end

Class Method Details

.from_json(h) ⇒ Object



29
30
31
32
# File 'lib/yourimageshare/types.rb', line 29

def self.from_json(h)
  new(data: (h["data"] || []).map { |row| ListedUpload.from_json(row) },
      meta: ListMeta.from_json(h["meta"] || {}))
end