Class: XTwitterScraper::Models::RadarItem::Metadata
Overview
Defined Under Namespace
Modules: SourceFormat
Instance Attribute Summary collapse
Instance Method Summary
collapse
==, #==, #[], 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
#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(author: nil, content_url: nil, estimated_downvotes: nil, estimated_upvotes: nil, number_comments: nil, score: nil, selftext: nil, source_format: nil, subreddit: nil, upvote_ratio: nil) ⇒ Object
Source-specific fields. Shape varies per source:
- reddit: { author, authorId?, subreddit, subredditId?, subredditSubscribers?,
sourceFormat, score?, upvoteRatio?, estimatedUpvotes?, estimatedDownvotes?,
numberComments?, numberCrossposts?, selftext?, contentUrl?, domain?,
postHint?, linkFlairText?, distinguished?, totalAwardsReceived?, viewCount?,
editedAt?, galleryImageUrls?, redditVideo?, archived?, contestMode?,
isCrosspostable?, isMeta?, isNsfw?, isOriginalContent?, isRobotIndexable?,
isSelf?, isSpoiler?, isVideo?, locked?, stickied? }.
score is Reddit's
public net score. Exact public upvote and downvote counts are not available.
Estimated counts derive from the public score and upvote ratio, which Reddit
may fuzz. Comment bodies are not included. Current items combine public
listing discovery with server-rendered post data and use sourceFormat: html;
json and rss remain for legacy rows.
- github: { starsToday: number }
- hacker_news: { points: number, numberComments: number }
- google_trends: { approxTraffic: number }
- polymarket: { volume24hr: number }
- wikipedia: { views: number }
- trustmrr: { mrr, growthPercent, last30Days, total, customers,
activeSubscriptions, onSale, xHandle?, category?, askingPrice?, country?,
foundedDate?, googleSearchImpressionsLast30Days?, growthMrrPercent?,
multiple?, paymentProvider?, profitMarginLast30Days?, rank?,
revenuePerVisitor?, targetAudience?, visitorsLast30Days? } For the startup
growth source, xHandle is the founder's X username without @. The rank field
is the source's revenue rank. Result order represents reported 30-day
revenue-growth rank.
|
# File 'lib/x_twitter_scraper/models/radar_item.rb', line 218
|
Instance Attribute Details
#author ⇒ String?
168
|
# File 'lib/x_twitter_scraper/models/radar_item.rb', line 168
optional :author, String
|
#content_url ⇒ String?
173
|
# File 'lib/x_twitter_scraper/models/radar_item.rb', line 173
optional :content_url, String, api_name: :contentUrl
|
#estimated_downvotes ⇒ Integer?
178
|
# File 'lib/x_twitter_scraper/models/radar_item.rb', line 178
optional :estimated_downvotes, Integer, api_name: :estimatedDownvotes
|
#estimated_upvotes ⇒ Integer?
183
|
# File 'lib/x_twitter_scraper/models/radar_item.rb', line 183
optional :estimated_upvotes, Integer, api_name: :estimatedUpvotes
|
188
|
# File 'lib/x_twitter_scraper/models/radar_item.rb', line 188
optional :number_comments, Integer, api_name: :numberComments
|
#score ⇒ Integer?
193
|
# File 'lib/x_twitter_scraper/models/radar_item.rb', line 193
optional :score, Integer
|
#selftext ⇒ String?
198
|
# File 'lib/x_twitter_scraper/models/radar_item.rb', line 198
optional :selftext, String
|
Current items use html. json and rss are retained for legacy rows.
204
205
206
|
# File 'lib/x_twitter_scraper/models/radar_item.rb', line 204
optional :source_format,
enum: -> { XTwitterScraper::RadarItem::Metadata::SourceFormat },
api_name: :sourceFormat
|
#subreddit ⇒ String?
211
|
# File 'lib/x_twitter_scraper/models/radar_item.rb', line 211
optional :subreddit, String
|
#upvote_ratio ⇒ Float?
216
|
# File 'lib/x_twitter_scraper/models/radar_item.rb', line 216
optional :upvote_ratio, Float, api_name: :upvoteRatio
|
Instance Method Details
#to_hash ⇒ {
189
|
# File 'sig/x_twitter_scraper/models/radar_item.rbs', line 189
def to_hash: -> {
|