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

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/x_twitter_scraper/models/x_get_notifications_response.rb,
sig/x_twitter_scraper/models/x_get_notifications_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:, 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)


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

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

Parameters:

  • value (String)

Returns:

  • (String)


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

required :id, String

#messageString?

Parameters:

  • (String)

Returns:

  • (String, nil)


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

optional :message, String

#timestampString?

Parameters:

  • (String)

Returns:

  • (String, nil)


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

optional :timestamp, String

#typeString?

Parameters:

  • (String)

Returns:

  • (String, nil)


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

optional :type, String

Instance Method Details

#to_hash{

Returns:

  • ({)


58
# File 'sig/x_twitter_scraper/models/x_get_notifications_response.rbs', line 58

def to_hash: -> {