Class: Fizzy::Types::Reaction

Inherits:
Data
  • Object
show all
Defined in:
lib/fizzy/generated/types.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#contentObject (readonly)

Returns the value of attribute content

Returns:

  • (Object)

    the current value of content



795
796
797
# File 'lib/fizzy/generated/types.rb', line 795

def content
  @content
end

#idObject (readonly)

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



795
796
797
# File 'lib/fizzy/generated/types.rb', line 795

def id
  @id
end

#reacterObject (readonly)

Returns the value of attribute reacter

Returns:

  • (Object)

    the current value of reacter



795
796
797
# File 'lib/fizzy/generated/types.rb', line 795

def reacter
  @reacter
end

#urlObject (readonly)

Returns the value of attribute url

Returns:

  • (Object)

    the current value of url



795
796
797
# File 'lib/fizzy/generated/types.rb', line 795

def url
  @url
end

Class Method Details

.from_json(data) ⇒ Object

Parameters:

  • data (Hash)

    raw JSON response



797
798
799
800
801
802
803
804
# File 'lib/fizzy/generated/types.rb', line 797

def self.from_json(data)
  new(
    id: data["id"],
    content: data["content"],
    reacter: data["reacter"] && User.from_json(data["reacter"]),
    url: data["url"]
  )
end