Class: XTwitterScraper::Models::X::TweetCreateResponse

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/x_twitter_scraper/models/x/tweet_create_response.rb,
sig/x_twitter_scraper/models/x/tweet_create_response.rbs

Overview

See Also:

  • XTwitterScraper::Resources::X::Tweets#create

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(charged:, charged_credits:, tweet_id:, write_action_id: nil, success: true) ⇒ Object

Some parameter documentations has been truncated, see XTwitterScraper::Models::X::TweetCreateResponse for more details.

Parameters:

  • charged (Boolean)
  • charged_credits (String)

    Credits charged for this tweet. Text-only tweets and replies cost 30 credits; at

  • tweet_id (String)
  • write_action_id (String) (defaults to: nil)
  • success (Boolean, true) (defaults to: true)


# File 'lib/x_twitter_scraper/models/x/tweet_create_response.rb', line 35

Instance Attribute Details

#chargedBoolean

Parameters:

  • value (Boolean)

Returns:

  • (Boolean)


11
# File 'lib/x_twitter_scraper/models/x/tweet_create_response.rb', line 11

required :charged, XTwitterScraper::Internal::Type::Boolean

#charged_creditsString

Credits charged for this tweet. Text-only tweets and replies cost 30 credits; attached media adds 2 credits per started MB.

Parameters:

  • value (String)

Returns:

  • (String)


18
# File 'lib/x_twitter_scraper/models/x/tweet_create_response.rb', line 18

required :charged_credits, String, api_name: :chargedCredits

#successBoolean, true

Parameters:

  • value (true)

Returns:

  • (Boolean, true)


23
# File 'lib/x_twitter_scraper/models/x/tweet_create_response.rb', line 23

required :success, const: true

#tweet_idString

Parameters:

  • value (String)

Returns:

  • (String)


28
# File 'lib/x_twitter_scraper/models/x/tweet_create_response.rb', line 28

required :tweet_id, String, api_name: :tweetId

#write_action_idString?

Parameters:

  • (String)

Returns:

  • (String, nil)


33
# File 'lib/x_twitter_scraper/models/x/tweet_create_response.rb', line 33

optional :write_action_id, String, api_name: :writeActionId

Instance Method Details

#to_hash{

Returns:

  • ({)


34
# File 'sig/x_twitter_scraper/models/x/tweet_create_response.rbs', line 34

def to_hash: -> {