Class: XTwitterScraper::Models::XGetNotificationsResponse::Notification

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/x_twitter_scraper/models/x_get_notifications_response.rb

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:, message: nil, timestamp: nil, type: nil) ⇒ Object

Parameters:

  • id (String)
  • message (String) (defaults to: nil)
  • timestamp (String) (defaults to: nil)
  • type (String) (defaults to: nil)


28
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
# File 'lib/x_twitter_scraper/models/x_get_notifications_response.rb', line 28

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

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

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

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

  # @!method initialize(id:, message: nil, timestamp: nil, type: nil)
  #   @param id [String]
  #   @param message [String]
  #   @param timestamp [String]
  #   @param type [String]
end

Instance Attribute Details

#idString

Returns:

  • (String)


32
# File 'lib/x_twitter_scraper/models/x_get_notifications_response.rb', line 32

required :id, String

#messageString?

Returns:

  • (String, nil)


37
# File 'lib/x_twitter_scraper/models/x_get_notifications_response.rb', line 37

optional :message, String

#timestampString?

Returns:

  • (String, nil)


42
# File 'lib/x_twitter_scraper/models/x_get_notifications_response.rb', line 42

optional :timestamp, String

#typeString?

Returns:

  • (String, nil)


47
# File 'lib/x_twitter_scraper/models/x_get_notifications_response.rb', line 47

optional :type, String