Class: GetStream::Generated::Models::GetOGResponse

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/getstream_ruby/generated/models/get_og_response.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#==, #inspect, omit_empty_fields, #to_h, #to_json

Constructor Details

#initialize(attributes = {}) ⇒ GetOGResponse

Initialize with attributes



83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# File 'lib/getstream_ruby/generated/models/get_og_response.rb', line 83

def initialize(attributes = {})
  super(attributes)
  @duration = attributes[:duration] || attributes['duration']
  @custom = attributes[:custom] || attributes['custom']
  @asset_url = attributes[:asset_url] || attributes['asset_url'] || nil
  @author_icon = attributes[:author_icon] || attributes['author_icon'] || nil
  @author_link = attributes[:author_link] || attributes['author_link'] || nil
  @author_name = attributes[:author_name] || attributes['author_name'] || nil
  @color = attributes[:color] || attributes['color'] || nil
  @fallback = attributes[:fallback] || attributes['fallback'] || nil
  @footer = attributes[:footer] || attributes['footer'] || nil
  @footer_icon = attributes[:footer_icon] || attributes['footer_icon'] || nil
  @image_url = attributes[:image_url] || attributes['image_url'] || nil
  @og_scrape_url = attributes[:og_scrape_url] || attributes['og_scrape_url'] || nil
  @original_height = attributes[:original_height] || attributes['original_height'] || nil
  @original_width = attributes[:original_width] || attributes['original_width'] || nil
  @pretext = attributes[:pretext] || attributes['pretext'] || nil
  @text = attributes[:text] || attributes['text'] || nil
  @thumb_url = attributes[:thumb_url] || attributes['thumb_url'] || nil
  @title = attributes[:title] || attributes['title'] || nil
  @title_link = attributes[:title_link] || attributes['title_link'] || nil
  @type = attributes[:type] || attributes['type'] || nil
  @actions = attributes[:actions] || attributes['actions'] || nil
  @fields = attributes[:fields] || attributes['fields'] || nil
  @giphy = attributes[:giphy] || attributes['giphy'] || nil
end

Instance Attribute Details

#actionsArray<Action>

Returns:



74
75
76
# File 'lib/getstream_ruby/generated/models/get_og_response.rb', line 74

def actions
  @actions
end

#asset_urlString

Returns URL of detected video or audio.

Returns:

  • (String)

    URL of detected video or audio



20
21
22
# File 'lib/getstream_ruby/generated/models/get_og_response.rb', line 20

def asset_url
  @asset_url
end

#author_iconString

Returns:

  • (String)


23
24
25
# File 'lib/getstream_ruby/generated/models/get_og_response.rb', line 23

def author_icon
  @author_icon
end

Returns og:site.

Returns:

  • (String)

    og:site



26
27
28
# File 'lib/getstream_ruby/generated/models/get_og_response.rb', line 26

def author_link
  @author_link
end

#author_nameString

Returns og:site_name.

Returns:

  • (String)

    og:site_name



29
30
31
# File 'lib/getstream_ruby/generated/models/get_og_response.rb', line 29

def author_name
  @author_name
end

#colorString

Returns:

  • (String)


32
33
34
# File 'lib/getstream_ruby/generated/models/get_og_response.rb', line 32

def color
  @color
end

#customObject

Returns:

  • (Object)


17
18
19
# File 'lib/getstream_ruby/generated/models/get_og_response.rb', line 17

def custom
  @custom
end

#durationString

Returns:

  • (String)


14
15
16
# File 'lib/getstream_ruby/generated/models/get_og_response.rb', line 14

def duration
  @duration
end

#fallbackString

Returns:

  • (String)


35
36
37
# File 'lib/getstream_ruby/generated/models/get_og_response.rb', line 35

def fallback
  @fallback
end

#fieldsArray<Field>

Returns:



77
78
79
# File 'lib/getstream_ruby/generated/models/get_og_response.rb', line 77

def fields
  @fields
end

Returns:

  • (String)


38
39
40
# File 'lib/getstream_ruby/generated/models/get_og_response.rb', line 38

def footer
  @footer
end

Returns:

  • (String)


41
42
43
# File 'lib/getstream_ruby/generated/models/get_og_response.rb', line 41

def footer_icon
  @footer_icon
end

#giphyImages

Returns:



80
81
82
# File 'lib/getstream_ruby/generated/models/get_og_response.rb', line 80

def giphy
  @giphy
end

#image_urlString

Returns URL of detected image.

Returns:

  • (String)

    URL of detected image



44
45
46
# File 'lib/getstream_ruby/generated/models/get_og_response.rb', line 44

def image_url
  @image_url
end

#og_scrape_urlString

Returns extracted url from the text.

Returns:

  • (String)

    extracted url from the text



47
48
49
# File 'lib/getstream_ruby/generated/models/get_og_response.rb', line 47

def og_scrape_url
  @og_scrape_url
end

#original_heightInteger

Returns:

  • (Integer)


50
51
52
# File 'lib/getstream_ruby/generated/models/get_og_response.rb', line 50

def original_height
  @original_height
end

#original_widthInteger

Returns:

  • (Integer)


53
54
55
# File 'lib/getstream_ruby/generated/models/get_og_response.rb', line 53

def original_width
  @original_width
end

#pretextString

Returns:

  • (String)


56
57
58
# File 'lib/getstream_ruby/generated/models/get_og_response.rb', line 56

def pretext
  @pretext
end

#textString

Returns og:description.

Returns:

  • (String)

    og:description



59
60
61
# File 'lib/getstream_ruby/generated/models/get_og_response.rb', line 59

def text
  @text
end

#thumb_urlString

Returns URL of detected thumb image.

Returns:

  • (String)

    URL of detected thumb image



62
63
64
# File 'lib/getstream_ruby/generated/models/get_og_response.rb', line 62

def thumb_url
  @thumb_url
end

#titleString

Returns og:title.

Returns:

  • (String)

    og:title



65
66
67
# File 'lib/getstream_ruby/generated/models/get_og_response.rb', line 65

def title
  @title
end

Returns og:url.

Returns:

  • (String)

    og:url



68
69
70
# File 'lib/getstream_ruby/generated/models/get_og_response.rb', line 68

def title_link
  @title_link
end

#typeString

Returns Attachment type, could be empty, image, audio or video.

Returns:

  • (String)

    Attachment type, could be empty, image, audio or video



71
72
73
# File 'lib/getstream_ruby/generated/models/get_og_response.rb', line 71

def type
  @type
end

Class Method Details

.json_field_mappingsObject

Override field mappings for JSON serialization



111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# File 'lib/getstream_ruby/generated/models/get_og_response.rb', line 111

def self.json_field_mappings
  {
    duration: 'duration',
    custom: 'custom',
    asset_url: 'asset_url',
    author_icon: 'author_icon',
    author_link: 'author_link',
    author_name: 'author_name',
    color: 'color',
    fallback: 'fallback',
    footer: 'footer',
    footer_icon: 'footer_icon',
    image_url: 'image_url',
    og_scrape_url: 'og_scrape_url',
    original_height: 'original_height',
    original_width: 'original_width',
    pretext: 'pretext',
    text: 'text',
    thumb_url: 'thumb_url',
    title: 'title',
    title_link: 'title_link',
    type: 'type',
    actions: 'actions',
    fields: 'fields',
    giphy: 'giphy'
  }
end