Class: XTwitterScraper::Resources::X::AccountConnectionChallenges

Inherits:
Object
  • Object
show all
Defined in:
lib/x_twitter_scraper/resources/x/account_connection_challenges.rb,
sig/x_twitter_scraper/resources/x/account_connection_challenges.rbs

Overview

Connected X account management

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ AccountConnectionChallenges

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of AccountConnectionChallenges.

Parameters:



35
36
37
# File 'lib/x_twitter_scraper/resources/x/account_connection_challenges.rb', line 35

def initialize(client:)
  @client = client
end

Instance Method Details

#submit(id, email_code:, request_options: {}) ⇒ XTwitterScraper::Models::X::AccountConnectionChallengeSubmitResponse

Submit X account email verification code

Parameters:

  • id (String)

    Resource ID returned by the matching create or list endpoint.

  • email_code (String)

    Code sent to the account email.

  • request_options (XTwitterScraper::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



21
22
23
24
25
26
27
28
29
30
# File 'lib/x_twitter_scraper/resources/x/account_connection_challenges.rb', line 21

def submit(id, params)
  parsed, options = XTwitterScraper::X::AccountConnectionChallengeSubmitParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["x/account-connection-challenges/%1$s/submit", id],
    body: parsed,
    model: XTwitterScraper::Models::X::AccountConnectionChallengeSubmitResponse,
    options: options
  )
end