x-twitter-scraper 0.10.2 → 0.10.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2eed85b02b44c9bcefbbec637c0063d3f95038d8951f30108ad4ab3853a60335
4
- data.tar.gz: 3b26cbff158153d925e414d3b8fea75ae087b49d96014125a96c2c7e7b9a7667
3
+ metadata.gz: 7f4f7490097e2a6d503e322f7cc58ad97ee1969eb5d63630b51cabba1e1475fa
4
+ data.tar.gz: e4d5168613a265fda0cf590313d0f636dad69fdde68cf01a62b117bc74669830
5
5
  SHA512:
6
- metadata.gz: 0b0f8c7ba5e866d08cb7fcf488481639e4026b08ae56e9a47e8b5919ad6be2f88b09485b9783b310aab837e7faa9aa07d2b12d3ebcbf22d7df2bca20ce2bde80
7
- data.tar.gz: 2d0eda060f2b3e5433951ab27fe1b12c48ffb083b989a53c8944edb68e31ae4ce0d39cdcd682b0aad76205441fc7cb35147a4398ce6ccb93e729de655d1c22af
6
+ metadata.gz: 25f7299ef958d3305df6f392af953a70b87aa1ae639486a90416e49c84fe27faaddd6472f4ba42349c6daf71353143f5a54026904321be69c115abbf63e93fdd
7
+ data.tar.gz: b34e28eba91790af3eb1e585156557ffd631fefd835cc9b1d84b5a8a35e7b81c7b78a8e1a0d7bcbc08e5db872ec2295b1866fede239f4a634d5005450fd09d43
data/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.10.4 (2026-08-21)
4
+
5
+ Full Changelog: [v0.10.3...v0.10.4](https://github.com/Xquik-dev/x-twitter-scraper-ruby/compare/v0.10.3...v0.10.4)
6
+
7
+ ### Documentation
8
+
9
+ * Remove repeated SDK copy and repair public links.
10
+
11
+ ## 0.10.3 (2026-08-21)
12
+
13
+ Full Changelog: [v0.10.2...v0.10.3](https://github.com/Xquik-dev/x-twitter-scraper-ruby/compare/v0.10.2...v0.10.3)
14
+
15
+ ### Documentation
16
+
17
+ * tighten SDK and contribution guidance
18
+
19
+ ### Chores
20
+
21
+ * simplify repository comments and formatter output
22
+
3
23
  ## 0.10.2 (2026-08-20)
4
24
 
5
25
  Full Changelog: [v0.10.1...v0.10.2](https://github.com/Xquik-dev/x-twitter-scraper-ruby/compare/v0.10.1...v0.10.2)
@@ -261,8 +281,6 @@ Full Changelog: [v0.1.0...v0.2.0](https://github.com/Xquik-dev/x-twitter-scraper
261
281
 
262
282
  ## 0.1.0 (2026-03-30)
263
283
 
264
- Full Changelog: [v0.0.1...v0.1.0](https://github.com/Xquik-dev/x-twitter-scraper-ruby/compare/v0.0.1...v0.1.0)
265
-
266
284
  ### Features
267
285
 
268
286
  * **api:** api update ([772ffdd](https://github.com/Xquik-dev/x-twitter-scraper-ruby/commit/772ffdd682ee96f94334441b9fc5b1e109559993))
data/README.md CHANGED
@@ -1,18 +1,14 @@
1
- # Xquik Ruby SDK: Twitter Search, Followers & X Automation
1
+ # Xquik Ruby SDK: Twitter search, followers & X automation
2
2
 
3
3
  [![OpenSSF Best Practices](https://www.bestpractices.dev/projects/13739/badge)](https://www.bestpractices.dev/projects/13739)
4
4
 
5
- Use the Xquik Ruby SDK for Twitter search, timelines, profiles & followers. Manage media, webhooks & X automation with typed request objects. It provides a Twitter API alternative through documented Xquik REST routes.
5
+ Use the Xquik Ruby SDK for Twitter search, timelines, profiles & followers.
6
+ Manage media, webhooks & X automation with typed requests.
7
+ Use documented Xquik REST routes as a Twitter API alternative.
6
8
 
7
9
  [Ruby SDK Guide](https://docs.xquik.com/sdks/ruby) | [REST API](https://docs.xquik.com/api-reference/overview) | [RubyDoc](https://gemdocs.org/gems/x-twitter-scraper) | [Webhooks](https://docs.xquik.com/api-reference/webhooks/create)
8
10
 
9
- ## Choose the Ruby SDK
10
-
11
- Choose this gem for Ruby services that use Sorbet or RBS. Reuse one client for pooled connections.
12
-
13
- ## Common Twitter & X Tasks
14
-
15
- Map each task to its REST route.
11
+ ## Common Twitter & X tasks
16
12
 
17
13
  | Task | REST Route | Usage |
18
14
  | --- | --- | --- |
@@ -28,12 +24,14 @@ Map each task to its REST route.
28
24
 
29
25
  ## Installation
30
26
 
27
+ Requires Ruby 3.2.0 or higher.
28
+
31
29
  Add the gem to your `Gemfile`:
32
30
 
33
31
  <!-- x-release-please-start-version -->
34
32
 
35
33
  ```ruby
36
- gem "x-twitter-scraper", "~> 0.10.2"
34
+ gem "x-twitter-scraper", "~> 0.10.4"
37
35
  ```
38
36
 
39
37
  <!-- x-release-please-end -->
@@ -45,7 +43,7 @@ require "bundler/setup"
45
43
  require "x_twitter_scraper"
46
44
 
47
45
  x_twitter_scraper = XTwitterScraper::Client.new(
48
- api_key: ENV["X_TWITTER_SCRAPER_API_KEY"] # This is the default and can be omitted
46
+ api_key: ENV["X_TWITTER_SCRAPER_API_KEY"] # Optional; the client reads this variable.
49
47
  )
50
48
 
51
49
  response = x_twitter_scraper.x.tweets.search(q: "from:elonmusk", limit: 10)
@@ -53,7 +51,7 @@ response = x_twitter_scraper.x.tweets.search(q: "from:elonmusk", limit: 10)
53
51
  puts(response)
54
52
  ```
55
53
 
56
- ### Handling Errors
54
+ ### Handling errors
57
55
 
58
56
  The SDK raises an `APIError` subclass for connection failures and non-2xx responses:
59
57
 
@@ -66,13 +64,11 @@ rescue XTwitterScraper::Errors::APIConnectionError => e
66
64
  rescue XTwitterScraper::Errors::RateLimitError => e
67
65
  puts("Rate limited. Retry later.")
68
66
  rescue XTwitterScraper::Errors::APIStatusError => e
69
- puts("The server returned another non-2xx status.")
67
+ puts("Request failed. Inspect the returned HTTP status.")
70
68
  puts(e.status)
71
69
  end
72
70
  ```
73
71
 
74
- The SDK uses these error classes:
75
-
76
72
  | Cause | Error Type |
77
73
  | ---------------- | -------------------------- |
78
74
  | HTTP 400 | `BadRequestError` |
@@ -89,17 +85,17 @@ The SDK uses these error classes:
89
85
 
90
86
  ### Retries
91
87
 
92
- The SDK retries connection errors, timeouts, and HTTP 408, 409, 429, and 5xx responses.
93
- It uses exponential backoff and attempts 2 retries by default.
88
+ The SDK retries connection errors, timeouts & HTTP 408, 409, 429, and 5xx responses.
89
+ It uses exponential backoff with 2 retries by default.
94
90
  Set `max_retries` to change or disable retries:
95
91
 
96
92
  ```ruby
97
- # Set the client default:
93
+ # Change the client default.
98
94
  x_twitter_scraper = XTwitterScraper::Client.new(
99
- max_retries: 0 # default is 2
95
+ max_retries: 0
100
96
  )
101
97
 
102
- # Override one request:
98
+ # Override one request.
103
99
  x_twitter_scraper.account.retrieve(request_options: {max_retries: 5})
104
100
  ```
105
101
 
@@ -108,25 +104,20 @@ x_twitter_scraper.account.retrieve(request_options: {max_retries: 5})
108
104
  Requests time out after 60 seconds. Set `timeout` to change or disable this limit:
109
105
 
110
106
  ```ruby
111
- # Set the client default:
107
+ # Change the client default.
112
108
  x_twitter_scraper = XTwitterScraper::Client.new(
113
- timeout: nil # default is 60
109
+ timeout: nil
114
110
  )
115
111
 
116
- # Override one request:
112
+ # Override one request.
117
113
  x_twitter_scraper.account.retrieve(request_options: {timeout: 5})
118
114
  ```
119
115
 
120
- On timeout, `XTwitterScraper::Errors::APITimeoutError` is raised.
121
-
122
- Timed-out requests follow the default retry policy.
116
+ Timeouts raise `XTwitterScraper::Errors::APITimeoutError` and follow the retry policy.
123
117
 
124
- ## Advanced Concepts
118
+ ## BaseModel
125
119
 
126
- ### BaseModel
127
-
128
- All parameter and response objects inherit from `XTwitterScraper::Internal::Type::BaseModel`.
129
- The base model provides these operations:
120
+ All parameter and response objects inherit from `XTwitterScraper::Internal::Type::BaseModel` and support:
130
121
 
131
122
  1. Access known and unknown fields with `obj[:prop]`.
132
123
  2. Destructure fields with `obj => {prop: prop}` or pattern matching.
@@ -134,13 +125,10 @@ The base model provides these operations:
134
125
  4. Print classes and instances in a readable format.
135
126
  5. Convert values with `#to_h`, `#deep_to_h`, `#to_json`, or `#to_yaml`.
136
127
 
137
- ### Making Custom or Undocumented Requests
138
-
139
- #### Undocumented Properties
128
+ ## Custom requests
140
129
 
141
- Send undocumented parameters and read undocumented response properties:
142
-
143
- A matching `extra_` option overrides its documented parameter.
130
+ Use `extra_query`, `extra_body`, or `extra_headers` under `request_options`.
131
+ Matching `extra_` values override documented parameters.
144
132
 
145
133
  ```ruby
146
134
  account =
@@ -155,12 +143,6 @@ account =
155
143
  puts(account[:my_undocumented_property])
156
144
  ```
157
145
 
158
- #### Undocumented Request Parameters
159
-
160
- Pass extra values through `extra_query`, `extra_body`, or `extra_headers` under `request_options:`.
161
-
162
- #### Undocumented Endpoints
163
-
164
146
  Use `client.request` for undocumented endpoints while retaining authentication and retries:
165
147
 
166
148
  ```ruby
@@ -173,7 +155,7 @@ response = client.request(
173
155
  )
174
156
  ```
175
157
 
176
- ### Concurrency & Connection Pooling
158
+ ## Concurrency & connection pooling
177
159
 
178
160
  Clients are thread-safe. Fork them only when no HTTP requests are in flight.
179
161
  Each client has an HTTP connection pool with a default size of 99.
@@ -183,7 +165,7 @@ Other SDK classes do not lock their data.
183
165
 
184
166
  ## Sorbet
185
167
 
186
- The SDK includes [RBI](https://sorbet.org/docs/rbi) definitions. It does not depend on `sorbet-runtime`.
168
+ The gem ships [RBI](https://sorbet.org/docs/rbi) definitions without `sorbet-runtime`.
187
169
 
188
170
  Pass request hashes or typed parameter objects:
189
171
 
@@ -198,8 +180,7 @@ x_twitter_scraper.x.tweets.search(**params)
198
180
 
199
181
  ### Enums
200
182
 
201
- The SDK does not depend on `sorbet-runtime` or provide [`T::Enum`](https://sorbet.org/docs/tenum) instances.
202
- It uses tagged symbols, which remain primitives at runtime:
183
+ Tagged symbols replace [`T::Enum`](https://sorbet.org/docs/tenum) and remain runtime primitives:
203
184
 
204
185
  ```ruby
205
186
  # :en
@@ -231,17 +212,10 @@ This package follows [SemVer](https://semver.org/spec/v2.0.0.html). Version `0`
231
212
 
232
213
  Changes to non-runtime `*.rbi` and `*.rbs` definitions remain non-breaking.
233
214
 
234
- ## Requirements
235
-
236
- Ruby 3.2.0 or higher.
237
-
238
- ## Security & Support
215
+ ## Help & contributing
239
216
 
240
217
  - Report vulnerabilities through the [security policy](SECURITY.md).
241
218
  - Ask usage questions through the [organization support policy](https://github.com/Xquik-dev/.github/blob/main/SUPPORT.md).
242
-
243
- ## Contributing
244
-
245
- See [the contributing documentation](https://github.com/Xquik-dev/x-twitter-scraper-ruby/tree/main/CONTRIBUTING.md).
219
+ - Read the [contribution guide](CONTRIBUTING.md).
246
220
 
247
221
  Xquik is an independent third-party service. Not affiliated with X Corp. "Twitter" and "X" are trademarks of X Corp.
data/SECURITY.md CHANGED
@@ -1,10 +1,10 @@
1
- # Security Policy
1
+ # Security policy
2
2
 
3
- ## Supported Versions
3
+ ## Supported versions
4
4
 
5
5
  Security fixes target the latest published release.
6
6
 
7
- ## Reporting A Vulnerability
7
+ ## Reporting a vulnerability
8
8
 
9
9
  Report vulnerabilities privately through
10
10
  [support@xquik.com](mailto:support@xquik.com).
@@ -403,8 +403,8 @@ module XTwitterScraper
403
403
  # Returns the raw value associated with the given key, if found. Otherwise, nil is
404
404
  # returned.
405
405
  #
406
- # It is valid to lookup keys that are not in the API spec, for example to access
407
- # undocumented features. This method does not parse response data into
406
+ # You may look up keys absent from the API spec, such as undocumented response fields.
407
+ # This method does not parse response data into
408
408
  # higher-level types. Lookup by anything other than a Symbol is an ArgumentError.
409
409
  #
410
410
  # @param key [Symbol]
@@ -78,8 +78,7 @@ module XTwitterScraper
78
78
 
79
79
  # @api private
80
80
  #
81
- # Unlike with primitives, `Enum` additionally validates that the value is a member
82
- # of the enum.
81
+ # Unlike primitives, `Enum` validates membership.
83
82
  #
84
83
  # @param value [String, Symbol, Object]
85
84
  #
@@ -37,16 +37,14 @@ module XTwitterScraper
37
37
  optional :idempotency_key, String
38
38
 
39
39
  # @!attribute extra_query
40
- # Extra query params to send with the request. These are `.merge`’d into any
41
- # `query` given at the client level.
40
+ # Extra query params merge into any `query` given at the client level.
42
41
  #
43
42
  # @return [Hash{String=>Array<String>, String, nil}, nil]
44
43
  optional :extra_query,
45
44
  XTwitterScraper::Internal::Type::HashOf[XTwitterScraper::Internal::Type::ArrayOf[String]]
46
45
 
47
46
  # @!attribute extra_headers
48
- # Extra headers to send with the request. These are `.merged`’d into any
49
- # `extra_headers` given at the client level.
47
+ # Extra headers merge into any `extra_headers` given at the client level.
50
48
  #
51
49
  # @return [Hash{String=>String, nil}, nil]
52
50
  optional :extra_headers, XTwitterScraper::Internal::Type::HashOf[String, nil?: true]
@@ -5,5 +5,5 @@
5
5
  # frozen_string_literal: true
6
6
 
7
7
  module XTwitterScraper
8
- VERSION = "0.10.2"
8
+ VERSION = "0.10.4"
9
9
  end
@@ -29,8 +29,7 @@ module XTwitterScraper
29
29
  sig { returns(T.nilable(String)) }
30
30
  attr_accessor :idempotency_key
31
31
 
32
- # Extra query params to send with the request. These are `.merge`’d into any
33
- # `query` given at the client level.
32
+ # Extra query params merge into any `query` given at the client level.
34
33
  sig do
35
34
  returns(
36
35
  T.nilable(T::Hash[String, T.nilable(T.any(T::Array[String], String))])
@@ -38,8 +37,7 @@ module XTwitterScraper
38
37
  end
39
38
  attr_accessor :extra_query
40
39
 
41
- # Extra headers to send with the request. These are `.merged`’d into any
42
- # `extra_headers` given at the client level.
40
+ # Extra headers merge into any `extra_headers` given at the client level.
43
41
  sig { returns(T.nilable(T::Hash[String, T.nilable(String)])) }
44
42
  attr_accessor :extra_headers
45
43
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: x-twitter-scraper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.2
4
+ version: 0.10.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Xquik