Class: XTwitterScraper::Models::Monitors::KeywordListResponse::Monitor

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/x_twitter_scraper/models/monitors/keyword_list_response.rb,
sig/x_twitter_scraper/models/monitors/keyword_list_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:, created_at:, event_types:, is_active:, next_billing_at:, query:) ⇒ Object

Keyword monitor that tracks matching public X activity.

Parameters:

  • id (String)
  • created_at (Time)
  • event_types (Array<Symbol, XTwitterScraper::Models::EventType>)

    Array of event types to subscribe to.

  • is_active (Boolean)
  • next_billing_at (Time)

    Next hourly credit charge time for this keyword query monitor.

  • query (String)


23
24
25
26
27
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# File 'lib/x_twitter_scraper/models/monitors/keyword_list_response.rb', line 23

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

  # @!attribute created_at
  #
  #   @return [Time]
  required :created_at, Time, api_name: :createdAt

  # @!attribute event_types
  #   Array of event types to subscribe to.
  #
  #   @return [Array<Symbol, XTwitterScraper::Models::EventType>]
  required :event_types,
           -> { XTwitterScraper::Internal::Type::ArrayOf[enum: XTwitterScraper::EventType] },
           api_name: :eventTypes

  # @!attribute is_active
  #
  #   @return [Boolean]
  required :is_active, XTwitterScraper::Internal::Type::Boolean, api_name: :isActive

  # @!attribute next_billing_at
  #   Next hourly credit charge time for this keyword query monitor.
  #
  #   @return [Time]
  required :next_billing_at, Time, api_name: :nextBillingAt

  # @!attribute query
  #
  #   @return [String]
  required :query, String

  # @!method initialize(id:, created_at:, event_types:, is_active:, next_billing_at:, query:)
  #   Keyword monitor that tracks matching public X activity.
  #
  #   @param id [String]
  #
  #   @param created_at [Time]
  #
  #   @param event_types [Array<Symbol, XTwitterScraper::Models::EventType>] Array of event types to subscribe to.
  #
  #   @param is_active [Boolean]
  #
  #   @param next_billing_at [Time] Next hourly credit charge time for this keyword query monitor.
  #
  #   @param query [String]
end

Instance Attribute Details

#created_atTime

Parameters:

  • value (Time)

Returns:

  • (Time)


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

required :created_at, Time, api_name: :createdAt

#event_typesArray<Symbol, XTwitterScraper::Models::EventType>

Array of event types to subscribe to.

Parameters:

  • value (::Array[XTwitterScraper::Models::event_type])

Returns:



38
39
40
# File 'lib/x_twitter_scraper/models/monitors/keyword_list_response.rb', line 38

required :event_types,
-> { XTwitterScraper::Internal::Type::ArrayOf[enum: XTwitterScraper::EventType] },
api_name: :eventTypes

#idString

Parameters:

  • value (String)

Returns:

  • (String)


27
# File 'lib/x_twitter_scraper/models/monitors/keyword_list_response.rb', line 27

required :id, String

#is_activeBoolean

Parameters:

  • value (Boolean)

Returns:

  • (Boolean)


45
# File 'lib/x_twitter_scraper/models/monitors/keyword_list_response.rb', line 45

required :is_active, XTwitterScraper::Internal::Type::Boolean, api_name: :isActive

#next_billing_atTime

Next hourly credit charge time for this keyword query monitor.

Parameters:

  • value (Time)

Returns:

  • (Time)


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

required :next_billing_at, Time, api_name: :nextBillingAt

#queryString

Parameters:

  • value (String)

Returns:

  • (String)


56
# File 'lib/x_twitter_scraper/models/monitors/keyword_list_response.rb', line 56

required :query, String

Instance Method Details

#to_hash{

Returns:

  • ({)


57
# File 'sig/x_twitter_scraper/models/monitors/keyword_list_response.rbs', line 57

def to_hash: -> {