Skip to content

Commit 1ba23fd

Browse files
sync public SDK contract
1 parent b433f8d commit 1ba23fd

35 files changed

Lines changed: 688 additions & 169 deletions

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 122
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik/x-twitter-scraper-1a468d8933b6612e40e8b8ebdf84f9e3f014799d0e9a05789b93a242324cd158.yml
3-
openapi_spec_hash: 25b9bc2b3b13c649eccc0a8624c233d3
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik/x-twitter-scraper-6390fae0cb8c75f6da61d4aabc5cf067cdcc1dd4ff5631e84e7e4067cb551b0c.yml
3+
openapi_spec_hash: c4bbf09f0a8a87fdd49cbea797a3e3af
44
config_hash: 4b64fbd16fd09008417c5a460d27f053

lib/x_twitter_scraper/models/credit_retrieve_topup_status_params.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ class CreditRetrieveTopupStatusParams < XTwitterScraper::Internal::Type::BaseMod
88
include XTwitterScraper::Internal::Type::RequestParameters
99

1010
# @!attribute session_id
11-
# Billing session ID returned by the top-up billing flow.
11+
# Top-up session ID to inspect.
1212
#
1313
# @return [String]
1414
required :session_id, String
1515

1616
# @!method initialize(session_id:, request_options: {})
17-
# @param session_id [String] Billing session ID returned by the top-up billing flow.
17+
# @param session_id [String] Top-up session ID to inspect.
1818
#
1919
# @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}]
2020
end

lib/x_twitter_scraper/models/error.rb

Lines changed: 68 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class Error < XTwitterScraper::Internal::Type::BaseModel
2121
optional :reason, String
2222

2323
# @!attribute retry_after
24-
# Required wait in seconds.
24+
# Seconds until the next permitted request.
2525
#
2626
# @return [Integer, nil]
2727
optional :retry_after, Integer, api_name: :retryAfter
@@ -43,7 +43,7 @@ class Error < XTwitterScraper::Internal::Type::BaseModel
4343
#
4444
# @param reason [String] Machine-readable reason for a login cooldown.
4545
#
46-
# @param retry_after [Integer] Required wait in seconds.
46+
# @param retry_after [Integer] Seconds until the next permitted request.
4747
#
4848
# @param retry_after_ms [Integer] Required wait in milliseconds.
4949

@@ -98,6 +98,39 @@ module LegacyErrorCode
9898
UNAUTHENTICATED = :unauthenticated
9999
UNSUPPORTED_FIELD = :unsupported_field
100100
USER_NOT_FOUND = :user_not_found
101+
BODY_TOO_LARGE = :body_too_large
102+
CHECKOUT_UNAVAILABLE = :checkout_unavailable
103+
CONNECTION_CHALLENGE_EXPIRED = :connection_challenge_expired
104+
CONNECTION_CHALLENGE_INACTIVE = :connection_challenge_inactive
105+
DRAFT_NOT_FOUND = :draft_not_found
106+
FAVORITERS_UNAVAILABLE = :favoriters_unavailable
107+
FORBIDDEN = :forbidden
108+
GUEST_WALLET_UNAVAILABLE = :guest_wallet_unavailable
109+
GUEST_WALLETS_DISABLED = :guest_wallets_disabled
110+
GUEST_WALLETS_UNAVAILABLE = :guest_wallets_unavailable
111+
IDEMPOTENCY_CONFLICT = :idempotency_conflict
112+
IDEMPOTENCY_KEY_CONFLICT = :idempotency_key_conflict
113+
INVALID_COMMUNITY_ID = :invalid_community_id
114+
INVALID_IDEMPOTENCY_KEY = :invalid_idempotency_key
115+
INVALID_LIST_ID = :invalid_list_id
116+
INVALID_PAYMENT_AMOUNT = :invalid_payment_amount
117+
INVALID_RANGE = :invalid_range
118+
LOGIN_RATE_LIMITED = :login_rate_limited
119+
MISSING_IDEMPOTENCY_KEY = :missing_idempotency_key
120+
MISSING_IDS = :missing_ids
121+
NO_CACHED_STYLE = :no_cached_style
122+
PASSKEY_REQUIRED = :passkey_required
123+
RATE_LIMITED = :rate_limited
124+
READ_REQUEST_TIMEOUT = :read_request_timeout
125+
REPLIES_INCOMPLETE = :replies_incomplete
126+
SUPPORT_MEDIA_RATE_LIMIT = :support_media_rate_limit
127+
SUPPORT_REQUEST_RATE_LIMIT = :support_request_rate_limit
128+
TOO_MANY_IDS = :too_many_ids
129+
UNKNOWN_FIELD = :unknown_field
130+
UNSUPPORTED_MEDIA_TYPE = :unsupported_media_type
131+
WEBHOOK_INACTIVE = :webhook_inactive
132+
WRITE_TRACKING_UNAVAILABLE = :write_tracking_unavailable
133+
X_WRITE_UNCONFIRMED = :x_write_unconfirmed
101134
X_ACCOUNT_FEATURE_REQUIRED = :x_account_feature_required
102135
X_ACCOUNT_PROTECTED = :x_account_protected
103136
X_ACCOUNT_SUSPENDED = :x_account_suspended
@@ -194,6 +227,39 @@ module Code
194227
UNAUTHENTICATED = :unauthenticated
195228
UNSUPPORTED_FIELD = :unsupported_field
196229
USER_NOT_FOUND = :user_not_found
230+
BODY_TOO_LARGE = :body_too_large
231+
CHECKOUT_UNAVAILABLE = :checkout_unavailable
232+
CONNECTION_CHALLENGE_EXPIRED = :connection_challenge_expired
233+
CONNECTION_CHALLENGE_INACTIVE = :connection_challenge_inactive
234+
DRAFT_NOT_FOUND = :draft_not_found
235+
FAVORITERS_UNAVAILABLE = :favoriters_unavailable
236+
FORBIDDEN = :forbidden
237+
GUEST_WALLET_UNAVAILABLE = :guest_wallet_unavailable
238+
GUEST_WALLETS_DISABLED = :guest_wallets_disabled
239+
GUEST_WALLETS_UNAVAILABLE = :guest_wallets_unavailable
240+
IDEMPOTENCY_CONFLICT = :idempotency_conflict
241+
IDEMPOTENCY_KEY_CONFLICT = :idempotency_key_conflict
242+
INVALID_COMMUNITY_ID = :invalid_community_id
243+
INVALID_IDEMPOTENCY_KEY = :invalid_idempotency_key
244+
INVALID_LIST_ID = :invalid_list_id
245+
INVALID_PAYMENT_AMOUNT = :invalid_payment_amount
246+
INVALID_RANGE = :invalid_range
247+
LOGIN_RATE_LIMITED = :login_rate_limited
248+
MISSING_IDEMPOTENCY_KEY = :missing_idempotency_key
249+
MISSING_IDS = :missing_ids
250+
NO_CACHED_STYLE = :no_cached_style
251+
PASSKEY_REQUIRED = :passkey_required
252+
RATE_LIMITED = :rate_limited
253+
READ_REQUEST_TIMEOUT = :read_request_timeout
254+
REPLIES_INCOMPLETE = :replies_incomplete
255+
SUPPORT_MEDIA_RATE_LIMIT = :support_media_rate_limit
256+
SUPPORT_REQUEST_RATE_LIMIT = :support_request_rate_limit
257+
TOO_MANY_IDS = :too_many_ids
258+
UNKNOWN_FIELD = :unknown_field
259+
UNSUPPORTED_MEDIA_TYPE = :unsupported_media_type
260+
WEBHOOK_INACTIVE = :webhook_inactive
261+
WRITE_TRACKING_UNAVAILABLE = :write_tracking_unavailable
262+
X_WRITE_UNCONFIRMED = :x_write_unconfirmed
197263
X_ACCOUNT_FEATURE_REQUIRED = :x_account_feature_required
198264
X_ACCOUNT_PROTECTED = :x_account_protected
199265
X_ACCOUNT_SUSPENDED = :x_account_suspended

lib/x_twitter_scraper/models/extraction_estimate_cost_params.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ class ExtractionEstimateCostParams < XTwitterScraper::Internal::Type::BaseModel
185185
optional :retweets_of_tweet_id, String, api_name: :retweetsOfTweetId
186186

187187
# @!attribute search_query
188-
# Required for tweet_search_extractor & community_search.
188+
# Query used to price tweet_search_extractor or community_search.
189189
#
190190
# @return [String, nil]
191191
optional :search_query, String, api_name: :searchQuery
@@ -197,20 +197,20 @@ class ExtractionEstimateCostParams < XTwitterScraper::Internal::Type::BaseModel
197197
optional :since_date, Date, api_name: :sinceDate
198198

199199
# @!attribute target_community_id
200-
# Required for community_post_extractor & community_search.
200+
# Community ID used to price community_post_extractor or community_search.
201201
#
202202
# @return [String, nil]
203203
optional :target_community_id, String, api_name: :targetCommunityId
204204

205205
# @!attribute target_list_id
206-
# Required for list_follower_explorer, list_member_extractor &
206+
# List ID used to price list_follower_explorer, list_member_extractor, or
207207
# list_post_extractor.
208208
#
209209
# @return [String, nil]
210210
optional :target_list_id, String, api_name: :targetListId
211211

212212
# @!attribute target_space_id
213-
# Required for space_explorer.
213+
# Space ID used to price space_explorer.
214214
#
215215
# @return [String, nil]
216216
optional :target_space_id, String, api_name: :targetSpaceId
@@ -309,15 +309,15 @@ class ExtractionEstimateCostParams < XTwitterScraper::Internal::Type::BaseModel
309309
#
310310
# @param retweets_of_tweet_id [String] Estimate only retweets of this tweet ID (tweet_search_extractor)
311311
#
312-
# @param search_query [String] Required for tweet_search_extractor & community_search.
312+
# @param search_query [String] Query used to price tweet_search_extractor or community_search.
313313
#
314314
# @param since_date [Date] Estimate start date in YYYY-MM-DD format (tweet_search_extractor)
315315
#
316-
# @param target_community_id [String] Required for community_post_extractor & community_search.
316+
# @param target_community_id [String] Community ID used to price community_post_extractor or community_search.
317317
#
318-
# @param target_list_id [String] Required for list_follower_explorer, list_member_extractor & list_post_extractor
318+
# @param target_list_id [String] List ID used to price list_follower_explorer, list_member_extractor, or list_pos
319319
#
320-
# @param target_space_id [String] Required for space_explorer.
320+
# @param target_space_id [String] Space ID used to price space_explorer.
321321
#
322322
# @param target_tweet_id [String]
323323
#

lib/x_twitter_scraper/models/guest_wallet_create_params.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class GuestWalletCreateParams < XTwitterScraper::Internal::Type::BaseModel
88
include XTwitterScraper::Internal::Type::RequestParameters
99

1010
# @!attribute amount_minor
11-
# Confirmed USD amount in cents.
11+
# USD cents accepted for this checkout.
1212
#
1313
# @return [Integer]
1414
required :amount_minor, Integer
@@ -24,7 +24,7 @@ class GuestWalletCreateParams < XTwitterScraper::Internal::Type::BaseModel
2424
required :idempotency_key, String
2525

2626
# @!method initialize(amount_minor:, idempotency_key:, currency: :usd, request_options: {})
27-
# @param amount_minor [Integer] Confirmed USD amount in cents.
27+
# @param amount_minor [Integer] USD cents accepted for this checkout.
2828
#
2929
# @param idempotency_key [String]
3030
#

lib/x_twitter_scraper/models/guest_wallet_topup_params.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class GuestWalletTopupParams < XTwitterScraper::Internal::Type::BaseModel
88
include XTwitterScraper::Internal::Type::RequestParameters
99

1010
# @!attribute amount_minor
11-
# Confirmed USD amount in cents.
11+
# USD cents accepted for this checkout.
1212
#
1313
# @return [Integer]
1414
required :amount_minor, Integer
@@ -24,7 +24,7 @@ class GuestWalletTopupParams < XTwitterScraper::Internal::Type::BaseModel
2424
required :idempotency_key, String
2525

2626
# @!method initialize(amount_minor:, idempotency_key:, currency: :usd, request_options: {})
27-
# @param amount_minor [Integer] Confirmed USD amount in cents.
27+
# @param amount_minor [Integer] USD cents accepted for this checkout.
2828
#
2929
# @param idempotency_key [String]
3030
#

lib/x_twitter_scraper/models/search_tweet.rb

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class SearchTweet < XTwitterScraper::Internal::Type::BaseModel
6868
optional :created_at, String, api_name: :createdAt
6969

7070
# @!attribute display_text_range
71-
# Start and end offsets for rendered tweet text
71+
# Rendered text's start and end offsets.
7272
#
7373
# @return [Array<Integer>, nil]
7474
optional :display_text_range,
@@ -83,19 +83,19 @@ class SearchTweet < XTwitterScraper::Internal::Type::BaseModel
8383
optional :entities, XTwitterScraper::Internal::Type::HashOf[XTwitterScraper::Internal::Type::Unknown]
8484

8585
# @!attribute in_reply_to_id
86-
# Tweet ID being replied to
86+
# ID of the tweet this result replies to.
8787
#
8888
# @return [String, nil]
8989
optional :in_reply_to_id, String, api_name: :inReplyToId
9090

9191
# @!attribute in_reply_to_user_id
92-
# User ID being replied to
92+
# ID of the user this result replies to.
9393
#
9494
# @return [String, nil]
9595
optional :in_reply_to_user_id, String, api_name: :inReplyToUserId
9696

9797
# @!attribute in_reply_to_username
98-
# Username being replied to
98+
# Username this result replies to.
9999
#
100100
# @return [String, nil]
101101
optional :in_reply_to_username, String, api_name: :inReplyToUsername
@@ -125,7 +125,7 @@ class SearchTweet < XTwitterScraper::Internal::Type::BaseModel
125125
optional :is_reply, XTwitterScraper::Internal::Type::Boolean, api_name: :isReply
126126

127127
# @!attribute lang
128-
# Tweet language code
128+
# Search result language code.
129129
#
130130
# @return [String, nil]
131131
optional :lang, String
@@ -164,7 +164,7 @@ class SearchTweet < XTwitterScraper::Internal::Type::BaseModel
164164
optional :type, String
165165

166166
# @!attribute url
167-
# Tweet permalink URL
167+
# Search result permalink.
168168
#
169169
# @return [String, nil]
170170
optional :url, String
@@ -200,15 +200,15 @@ class SearchTweet < XTwitterScraper::Internal::Type::BaseModel
200200
#
201201
# @param created_at [String]
202202
#
203-
# @param display_text_range [Array<Integer>] Start and end offsets for rendered tweet text
203+
# @param display_text_range [Array<Integer>] Rendered text's start and end offsets.
204204
#
205205
# @param entities [Hash{Symbol=>Object}] Parsed search-result entities including URLs, mentions, hashtags, and media mark
206206
#
207-
# @param in_reply_to_id [String] Tweet ID being replied to
207+
# @param in_reply_to_id [String] ID of the tweet this result replies to.
208208
#
209-
# @param in_reply_to_user_id [String] User ID being replied to
209+
# @param in_reply_to_user_id [String] ID of the user this result replies to.
210210
#
211-
# @param in_reply_to_username [String] Username being replied to
211+
# @param in_reply_to_username [String] Username this result replies to.
212212
#
213213
# @param is_limited_reply [Boolean] Whether the tweet has limited reply permissions
214214
#
@@ -218,7 +218,7 @@ class SearchTweet < XTwitterScraper::Internal::Type::BaseModel
218218
#
219219
# @param is_reply [Boolean] True when this search result is a reply
220220
#
221-
# @param lang [String] Tweet language code
221+
# @param lang [String] Search result language code.
222222
#
223223
# @param media [Array<XTwitterScraper::Models::TweetMedia>] Search-result media attachments, omitted when no media is present
224224
#
@@ -230,7 +230,7 @@ class SearchTweet < XTwitterScraper::Internal::Type::BaseModel
230230
#
231231
# @param type [String]
232232
#
233-
# @param url [String] Tweet permalink URL
233+
# @param url [String] Search result permalink.
234234
end
235235
end
236236
end

lib/x_twitter_scraper/models/support/ticket_create_response.rb

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@ module Support
77
class TicketCreateResponse < XTwitterScraper::Internal::Type::BaseModel
88
# @!attribute attachments
99
#
10-
# @return [Array<XTwitterScraper::Models::Support::TicketCreateResponse::Attachment>, nil]
11-
optional :attachments,
10+
# @return [Array<XTwitterScraper::Models::Support::TicketCreateResponse::Attachment>]
11+
required :attachments,
1212
-> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::Support::TicketCreateResponse::Attachment] }
1313

1414
# @!attribute public_id
1515
#
16-
# @return [String, nil]
17-
optional :public_id, String, api_name: :publicId
16+
# @return [String]
17+
required :public_id, String, api_name: :publicId
1818

19-
# @!method initialize(attachments: nil, public_id: nil)
19+
# @!method initialize(attachments:, public_id:)
2020
# @param attachments [Array<XTwitterScraper::Models::Support::TicketCreateResponse::Attachment>]
2121
# @param public_id [String]
2222

@@ -32,6 +32,8 @@ class Attachment < XTwitterScraper::Internal::Type::BaseModel
3232
required :status, enum: -> { XTwitterScraper::Models::Support::TicketCreateResponse::Attachment::Status }
3333

3434
# @!method initialize(public_id:, status:)
35+
# Attachment identifier and initial processing state.
36+
#
3537
# @param public_id [String]
3638
# @param status [Symbol, XTwitterScraper::Models::Support::TicketCreateResponse::Attachment::Status]
3739

lib/x_twitter_scraper/models/support/ticket_reply_response.rb

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@ module Support
77
class TicketReplyResponse < XTwitterScraper::Internal::Type::BaseModel
88
# @!attribute attachments
99
#
10-
# @return [Array<XTwitterScraper::Models::Support::TicketReplyResponse::Attachment>, nil]
11-
optional :attachments,
10+
# @return [Array<XTwitterScraper::Models::Support::TicketReplyResponse::Attachment>]
11+
required :attachments,
1212
-> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::Support::TicketReplyResponse::Attachment] }
1313

1414
# @!attribute public_id
1515
#
16-
# @return [String, nil]
17-
optional :public_id, String, api_name: :publicId
16+
# @return [String]
17+
required :public_id, String, api_name: :publicId
1818

19-
# @!method initialize(attachments: nil, public_id: nil)
19+
# @!method initialize(attachments:, public_id:)
2020
# @param attachments [Array<XTwitterScraper::Models::Support::TicketReplyResponse::Attachment>]
2121
# @param public_id [String]
2222

@@ -32,6 +32,8 @@ class Attachment < XTwitterScraper::Internal::Type::BaseModel
3232
required :status, enum: -> { XTwitterScraper::Models::Support::TicketReplyResponse::Attachment::Status }
3333

3434
# @!method initialize(public_id:, status:)
35+
# Attachment identifier and initial processing state.
36+
#
3537
# @param public_id [String]
3638
# @param status [Symbol, XTwitterScraper::Models::Support::TicketReplyResponse::Attachment::Status]
3739

0 commit comments

Comments
 (0)