Class: XapiScraper::Models::Components::TweetModel

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Includes:
Crystalline::MetadataFields
Defined in:
lib/xapi_scraper/models/components/tweetmodel.rb

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

#field, #fields, included, #marshal_single, #to_dict, #to_json

Constructor Details

#initialize(tweet_id:, text:, edit_tweet_ids: nil, hashtags: nil, cashtags: nil, media: nil, related_tweets: nil, replies: nil, urls: nil, is_paid_promotion: nil, created_at: nil, created_at_datetime: nil, bookmark_count: nil, bookmarked: nil, community_note: nil, editable_until_msecs: nil, edits_remaining: nil, favorite_count: nil, favorited: nil, full_text: nil, has_card: nil, has_community_notes: nil, id: nil, in_reply_to: nil, in_reply_to_user_id: nil, in_reply_to_screen_name: nil, is_edit_eligible: nil, is_quote_status: nil, quoted_status_id_str: nil, is_translatable: nil, lang: nil, place: nil, poll: nil, possibly_sensitive: nil, possibly_sensitive_editable: nil, quote: nil, quote_count: nil, reply_count: nil, reply_to: nil, retweet_count: nil, retweeted_tweet: nil, thread: nil, thumbnail_title: nil, thumbnail_url: nil, user: nil, view_count: nil, view_count_state: nil, status: nil, target_count: nil) ⇒ TweetModel

Returns a new instance of TweetModel.



359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
# File 'lib/xapi_scraper/models/components/tweetmodel.rb', line 359

def initialize(
  tweet_id:,
  text:,
  edit_tweet_ids: nil,
  hashtags: nil,
  cashtags: nil,
  media: nil,
  related_tweets: nil,
  replies: nil,
  urls: nil,
  is_paid_promotion: nil,
  created_at: nil,
  created_at_datetime: nil,
  bookmark_count: nil,
  bookmarked: nil,
  community_note: nil,
  editable_until_msecs: nil,
  edits_remaining: nil,
  favorite_count: nil,
  favorited: nil,
  full_text: nil,
  has_card: nil,
  has_community_notes: nil,
  id: nil,
  in_reply_to: nil,
  in_reply_to_user_id: nil,
  in_reply_to_screen_name: nil,
  is_edit_eligible: nil,
  is_quote_status: nil,
  quoted_status_id_str: nil,
  is_translatable: nil,
  lang: nil,
  place: nil,
  poll: nil,
  possibly_sensitive: nil,
  possibly_sensitive_editable: nil,
  quote: nil,
  quote_count: nil,
  reply_count: nil,
  reply_to: nil,
  retweet_count: nil,
  retweeted_tweet: nil,
  thread: nil,
  thumbnail_title: nil,
  thumbnail_url: nil,
  user: nil,
  view_count: nil,
  view_count_state: nil,
  status: nil,
  target_count: nil
)
  @tweet_id = tweet_id
  @text = text
  @edit_tweet_ids = edit_tweet_ids
  @hashtags = hashtags
  @cashtags = cashtags
  @media = media
  @related_tweets = related_tweets
  @replies = replies
  @urls = urls
  @is_paid_promotion = is_paid_promotion
  @created_at = created_at
  @created_at_datetime = created_at_datetime
  @bookmark_count = bookmark_count
  @bookmarked = bookmarked
  @community_note = community_note
  @editable_until_msecs = editable_until_msecs
  @edits_remaining = edits_remaining
  @favorite_count = favorite_count
  @favorited = favorited
  @full_text = full_text
  @has_card = has_card
  @has_community_notes = has_community_notes
  @id = id
  @in_reply_to = in_reply_to
  @in_reply_to_user_id = in_reply_to_user_id
  @in_reply_to_screen_name = in_reply_to_screen_name
  @is_edit_eligible = is_edit_eligible
  @is_quote_status = is_quote_status
  @quoted_status_id_str = quoted_status_id_str
  @is_translatable = is_translatable
  @lang = lang
  @place = place
  @poll = poll
  @possibly_sensitive = possibly_sensitive
  @possibly_sensitive_editable = possibly_sensitive_editable
  @quote = quote
  @quote_count = quote_count
  @reply_count = reply_count
  @reply_to = reply_to
  @retweet_count = retweet_count
  @retweeted_tweet = retweeted_tweet
  @thread = thread
  @thumbnail_title = thumbnail_title
  @thumbnail_url = thumbnail_url
  @user = user
  @view_count = view_count
  @view_count_state = view_count_state
  @status = status
  @target_count = target_count
end

Instance Method Details

#==(other) ⇒ Object



462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
# File 'lib/xapi_scraper/models/components/tweetmodel.rb', line 462

def ==(other)
  return false unless other.is_a?(self.class)
  return false unless @tweet_id == other.tweet_id
  return false unless @text == other.text
  return false unless @edit_tweet_ids == other.edit_tweet_ids
  return false unless @hashtags == other.hashtags
  return false unless @cashtags == other.cashtags
  return false unless @media == other.media
  return false unless @related_tweets == other.related_tweets
  return false unless @replies == other.replies
  return false unless @urls == other.urls
  return false unless @is_paid_promotion == other.is_paid_promotion
  return false unless @created_at == other.created_at
  return false unless @created_at_datetime == other.created_at_datetime
  return false unless @bookmark_count == other.bookmark_count
  return false unless @bookmarked == other.bookmarked
  return false unless @community_note == other.community_note
  return false unless @editable_until_msecs == other.editable_until_msecs
  return false unless @edits_remaining == other.edits_remaining
  return false unless @favorite_count == other.favorite_count
  return false unless @favorited == other.favorited
  return false unless @full_text == other.full_text
  return false unless @has_card == other.has_card
  return false unless @has_community_notes == other.has_community_notes
  return false unless @id == other.id
  return false unless @in_reply_to == other.in_reply_to
  return false unless @in_reply_to_user_id == other.in_reply_to_user_id
  return false unless @in_reply_to_screen_name == other.in_reply_to_screen_name
  return false unless @is_edit_eligible == other.is_edit_eligible
  return false unless @is_quote_status == other.is_quote_status
  return false unless @quoted_status_id_str == other.quoted_status_id_str
  return false unless @is_translatable == other.is_translatable
  return false unless @lang == other.lang
  return false unless @place == other.place
  return false unless @poll == other.poll
  return false unless @possibly_sensitive == other.possibly_sensitive
  return false unless @possibly_sensitive_editable == other.possibly_sensitive_editable
  return false unless @quote == other.quote
  return false unless @quote_count == other.quote_count
  return false unless @reply_count == other.reply_count
  return false unless @reply_to == other.reply_to
  return false unless @retweet_count == other.retweet_count
  return false unless @retweeted_tweet == other.retweeted_tweet
  return false unless @thread == other.thread
  return false unless @thumbnail_title == other.thumbnail_title
  return false unless @thumbnail_url == other.thumbnail_url
  return false unless @user == other.user
  return false unless @view_count == other.view_count
  return false unless @view_count_state == other.view_count_state
  return false unless @status == other.status
  return false unless @target_count == other.target_count
  true
end