Class: XTwitterScraper::Models::PaginatedTweets

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/x_twitter_scraper/models/paginated_tweets.rb,
sig/x_twitter_scraper/models/paginated_tweets.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(has_next_page:, next_cursor:, tweets:) ⇒ Object

Paginated tweet results. The item count can be lower than pageSize when the source returns fewer tweets, filters remove tweets, or remaining credits cover fewer results. Follow next_cursor while has_next_page is true. An empty page can still have has_next_page true after filtering. Zero affordable results returns 402 insufficient_credits.

Parameters:



# File 'lib/x_twitter_scraper/models/paginated_tweets.rb', line 21

Instance Attribute Details

#has_next_pageBoolean

Parameters:

  • value (Boolean)

Returns:

  • (Boolean)


9
# File 'lib/x_twitter_scraper/models/paginated_tweets.rb', line 9

required :has_next_page, XTwitterScraper::Internal::Type::Boolean

#next_cursorString

Parameters:

  • value (String)

Returns:

  • (String)


14
# File 'lib/x_twitter_scraper/models/paginated_tweets.rb', line 14

required :next_cursor, String

#tweetsArray<XTwitterScraper::Models::SearchTweet>

Parameters:

Returns:



19
# File 'lib/x_twitter_scraper/models/paginated_tweets.rb', line 19

required :tweets, -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::SearchTweet] }

Instance Method Details

#to_hash{

Returns:

  • ({)


23
# File 'sig/x_twitter_scraper/models/paginated_tweets.rbs', line 23

def to_hash: -> {