Class: XTwitterScraper::Models::PaginatedTweets
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- XTwitterScraper::Models::PaginatedTweets
- Defined in:
- lib/x_twitter_scraper/models/paginated_tweets.rb,
sig/x_twitter_scraper/models/paginated_tweets.rbs
Instance Attribute Summary collapse
- #has_next_page ⇒ Boolean
- #next_cursor ⇒ String
- #tweets ⇒ Array<XTwitterScraper::Models::SearchTweet>
Instance Method Summary collapse
-
#initialize(has_next_page:, next_cursor:, tweets:) ⇒ Object
constructor
Paginated tweet results.
- #to_hash ⇒ {
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.
|
|
# File 'lib/x_twitter_scraper/models/paginated_tweets.rb', line 21
|
Instance Attribute Details
#has_next_page ⇒ Boolean
9 |
# File 'lib/x_twitter_scraper/models/paginated_tweets.rb', line 9 required :has_next_page, XTwitterScraper::Internal::Type::Boolean |
#next_cursor ⇒ String
14 |
# File 'lib/x_twitter_scraper/models/paginated_tweets.rb', line 14 required :next_cursor, String |
#tweets ⇒ Array<XTwitterScraper::Models::SearchTweet>
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 ⇒ {
23 |
# File 'sig/x_twitter_scraper/models/paginated_tweets.rbs', line 23
def to_hash: -> {
|