Class: XTwitterScraper::Models::X::DmRetrieveHistoryResponse::Message

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/x_twitter_scraper/models/x/dm_retrieve_history_response.rb,
sig/x_twitter_scraper/models/x/dm_retrieve_history_response.rbs

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(id:, receiver_id:, sender_id:, created_at: nil, media_url: nil, text: nil) ⇒ Object

Some parameter documentations has been truncated, see XTwitterScraper::Models::X::DmRetrieveHistoryResponse::Message for more details.

Parameters:

  • id (String)
  • receiver_id (String)
  • sender_id (String)
  • created_at (String) (defaults to: nil)
  • media_url (String) (defaults to: nil)

    URL of attached media (image, GIF, or video). Omitted when the message has no me

  • text (String) (defaults to: nil)


29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# File 'lib/x_twitter_scraper/models/x/dm_retrieve_history_response.rb', line 29

class Message < XTwitterScraper::Internal::Type::BaseModel
  # @!attribute id
  #
  #   @return [String]
  required :id, String

  # @!attribute receiver_id
  #
  #   @return [String]
  required :receiver_id, String, api_name: :receiverId

  # @!attribute sender_id
  #
  #   @return [String]
  required :sender_id, String, api_name: :senderId

  # @!attribute created_at
  #
  #   @return [String, nil]
  optional :created_at, String, api_name: :createdAt

  # @!attribute media_url
  #   URL of attached media (image, GIF, or video). Omitted when the message has no
  #   media attachment.
  #
  #   @return [String, nil]
  optional :media_url, String, api_name: :mediaUrl

  # @!attribute text
  #
  #   @return [String, nil]
  optional :text, String

  # @!method initialize(id:, receiver_id:, sender_id:, created_at: nil, media_url: nil, text: nil)
  #   Some parameter documentations has been truncated, see
  #   {XTwitterScraper::Models::X::DmRetrieveHistoryResponse::Message} for more
  #   details.
  #
  #   @param id [String]
  #
  #   @param receiver_id [String]
  #
  #   @param sender_id [String]
  #
  #   @param created_at [String]
  #
  #   @param media_url [String] URL of attached media (image, GIF, or video). Omitted when the message has no me
  #
  #   @param text [String]
end

Instance Attribute Details

#created_atString?

Parameters:

  • (String)

Returns:

  • (String, nil)


48
# File 'lib/x_twitter_scraper/models/x/dm_retrieve_history_response.rb', line 48

optional :created_at, String, api_name: :createdAt

#idString

Parameters:

  • value (String)

Returns:

  • (String)


33
# File 'lib/x_twitter_scraper/models/x/dm_retrieve_history_response.rb', line 33

required :id, String

#media_urlString?

URL of attached media (image, GIF, or video). Omitted when the message has no media attachment.

Parameters:

  • (String)

Returns:

  • (String, nil)


55
# File 'lib/x_twitter_scraper/models/x/dm_retrieve_history_response.rb', line 55

optional :media_url, String, api_name: :mediaUrl

#receiver_idString

Parameters:

  • value (String)

Returns:

  • (String)


38
# File 'lib/x_twitter_scraper/models/x/dm_retrieve_history_response.rb', line 38

required :receiver_id, String, api_name: :receiverId

#sender_idString

Parameters:

  • value (String)

Returns:

  • (String)


43
# File 'lib/x_twitter_scraper/models/x/dm_retrieve_history_response.rb', line 43

required :sender_id, String, api_name: :senderId

#textString?

Parameters:

  • (String)

Returns:

  • (String, nil)


60
# File 'lib/x_twitter_scraper/models/x/dm_retrieve_history_response.rb', line 60

optional :text, String

Instance Method Details

#to_hash{

Returns:

  • ({)


68
# File 'sig/x_twitter_scraper/models/x/dm_retrieve_history_response.rbs', line 68

def to_hash: -> {