Class: YourImageShare::UploadResult

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

Overview

Response shape for a successful upload - same fields as the Go/JS/Python/PHP SDKs' UploadResult.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#directObject

Returns the value of attribute direct

Returns:

  • (Object)

    the current value of direct



4
5
6
# File 'lib/yourimageshare/types.rb', line 4

def direct
  @direct
end

#expires_atObject

Returns the value of attribute expires_at

Returns:

  • (Object)

    the current value of expires_at



4
5
6
# File 'lib/yourimageshare/types.rb', line 4

def expires_at
  @expires_at
end

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



4
5
6
# File 'lib/yourimageshare/types.rb', line 4

def id
  @id
end

#pathObject

Returns the value of attribute path

Returns:

  • (Object)

    the current value of path



4
5
6
# File 'lib/yourimageshare/types.rb', line 4

def path
  @path
end

#srcObject

Returns the value of attribute src

Returns:

  • (Object)

    the current value of src



4
5
6
# File 'lib/yourimageshare/types.rb', line 4

def src
  @src
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



4
5
6
# File 'lib/yourimageshare/types.rb', line 4

def type
  @type
end

Class Method Details

.from_json(h) ⇒ Object



5
6
7
8
# File 'lib/yourimageshare/types.rb', line 5

def self.from_json(h)
  new(id: h["id"], type: h["type"], path: h["path"], src: h["src"],
      direct: h["direct"], expires_at: h["expires_at"])
end