Skip to content

Commit ab6768a

Browse files
release: 0.2.0 (#2)
* feat(api): api update * codegen metadata * feat(api): api update * codegen metadata * codegen metadata * codegen metadata * codegen metadata * chore: update SDK settings * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * release: 0.2.0 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent 831f1ca commit ab6768a

205 files changed

Lines changed: 38640 additions & 1477 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/publish-sonatype.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
export -- GPG_SIGNING_KEY_ID
3434
printenv -- GPG_SIGNING_KEY | gpg --batch --passphrase-fd 3 --import 3<<< "$GPG_SIGNING_PASSWORD"
3535
GPG_SIGNING_KEY_ID="$(gpg --with-colons --list-keys | awk -F : -- '/^pub:/ { getline; print "0x" substr($10, length($10) - 7) }')"
36-
./gradlew publish --no-configuration-cache
36+
./gradlew publishAndReleaseToMavenCentral --stacktrace -PmavenCentralUsername="$SONATYPE_USERNAME" -PmavenCentralPassword="$SONATYPE_PASSWORD" --no-configuration-cache
3737
env:
3838
SONATYPE_USERNAME: ${{ secrets.X_TWITTER_SCRAPER_SONATYPE_USERNAME || secrets.SONATYPE_USERNAME }}
3939
SONATYPE_PASSWORD: ${{ secrets.X_TWITTER_SCRAPER_SONATYPE_PASSWORD || secrets.SONATYPE_PASSWORD }}

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.1.0"
2+
".": "0.2.0"
33
}

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 115
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik%2Fx-twitter-scraper-af60c455e2c8579c3d7f0e33c07c0b8332aa3fe8869688c47b2fbf151e271235.yml
3-
openapi_spec_hash: a49d40286e54da6a4978a103b118d33f
4-
config_hash: cec075ca53645b9620ec200be71bdc48
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik%2Fx-twitter-scraper-3b2c6c771ad1da0bbfeb0af115972929ed2c7fcd5e47a79556d66cd21431b224.yml
3+
openapi_spec_hash: de2890233b68387bf5f9b6d19e7d87dc
4+
config_hash: 8894c96caeb6df84c9394518810221bd

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# Changelog
22

3+
## 0.2.0 (2026-04-01)
4+
5+
Full Changelog: [v0.1.0...v0.2.0](https://github.com/Xquik-dev/x-twitter-scraper-java/compare/v0.1.0...v0.2.0)
6+
7+
### Features
8+
9+
* **api:** api update ([31b819a](https://github.com/Xquik-dev/x-twitter-scraper-java/commit/31b819aeae39651f9f9204561f6be9719c7a8d6a))
10+
* **api:** api update ([30ac688](https://github.com/Xquik-dev/x-twitter-scraper-java/commit/30ac6883a272290b03f5baa499ae2b61ac168259))
11+
12+
13+
### Chores
14+
15+
* update SDK settings ([e22bccf](https://github.com/Xquik-dev/x-twitter-scraper-java/commit/e22bccf3d47dfd11929924969cb5438b131069f7))
16+
317
## 0.1.0 (2026-03-30)
418

519
Full Changelog: [v0.0.1...v0.1.0](https://github.com/Xquik-dev/x-twitter-scraper-java/compare/v0.0.1...v0.1.0)

README.md

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,20 @@
22

33
<!-- x-release-please-start-version -->
44

5-
[![Maven Central](https://img.shields.io/maven-central/v/com.x_twitter_scraper.api/x-twitter-scraper-java)](https://central.sonatype.com/artifact/com.x_twitter_scraper.api/x-twitter-scraper-java/0.1.0)
6-
[![javadoc](https://javadoc.io/badge2/com.x_twitter_scraper.api/x-twitter-scraper-java/0.1.0/javadoc.svg)](https://javadoc.io/doc/com.x_twitter_scraper.api/x-twitter-scraper-java/0.1.0)
5+
[![Maven Central](https://img.shields.io/maven-central/v/com.x_twitter_scraper.api/x-twitter-scraper-java)](https://central.sonatype.com/artifact/com.x_twitter_scraper.api/x-twitter-scraper-java/0.2.0)
6+
[![javadoc](https://javadoc.io/badge2/com.x_twitter_scraper.api/x-twitter-scraper-java/0.2.0/javadoc.svg)](https://javadoc.io/doc/com.x_twitter_scraper.api/x-twitter-scraper-java/0.2.0)
77

88
<!-- x-release-please-end -->
99

1010
The X Twitter Scraper Java SDK provides convenient access to the [X Twitter Scraper REST API](https://xquik.com) from applications written in Java.
1111

12+
The X Twitter Scraper Java SDK is similar to the X Twitter Scraper Kotlin SDK but with minor differences that make it more ergonomic for use in Java, such as `Optional` instead of nullable values, `Stream` instead of `Sequence`, and `CompletableFuture` instead of suspend functions.
13+
1214
It is generated with [Stainless](https://www.stainless.com/).
1315

1416
<!-- x-release-please-start-version -->
1517

16-
The REST API documentation can be found on [xquik.com](https://xquik.com). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.x_twitter_scraper.api/x-twitter-scraper-java/0.1.0).
18+
The REST API documentation can be found on [xquik.com](https://xquik.com). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.x_twitter_scraper.api/x-twitter-scraper-java/0.2.0).
1719

1820
<!-- x-release-please-end -->
1921

@@ -24,7 +26,7 @@ The REST API documentation can be found on [xquik.com](https://xquik.com). Javad
2426
### Gradle
2527

2628
```kotlin
27-
implementation("com.x_twitter_scraper.api:x-twitter-scraper-java:0.1.0")
29+
implementation("com.x_twitter_scraper.api:x-twitter-scraper-java:0.2.0")
2830
```
2931

3032
### Maven
@@ -33,7 +35,7 @@ implementation("com.x_twitter_scraper.api:x-twitter-scraper-java:0.1.0")
3335
<dependency>
3436
<groupId>com.x_twitter_scraper.api</groupId>
3537
<artifactId>x-twitter-scraper-java</artifactId>
36-
<version>0.1.0</version>
38+
<version>0.2.0</version>
3739
</dependency>
3840
```
3941

@@ -48,8 +50,8 @@ This library requires Java 8 or later.
4850
```java
4951
import com.x_twitter_scraper.api.client.XTwitterScraperClient;
5052
import com.x_twitter_scraper.api.client.okhttp.XTwitterScraperOkHttpClient;
51-
import com.x_twitter_scraper.api.models.PaginatedTweets;
5253
import com.x_twitter_scraper.api.models.x.tweets.TweetSearchParams;
54+
import com.x_twitter_scraper.api.models.x.tweets.TweetSearchResponse;
5355

5456
// Configures using the `xtwitterscraper.apiKey`, `xtwitterscraper.bearerToken` and `xtwitterscraper.baseUrl` system properties
5557
// Or configures using the `X_TWITTER_SCRAPER_API_KEY`, `X_TWITTER_SCRAPER_BEARER_TOKEN` and `X_TWITTER_SCRAPER_BASE_URL` environment variables
@@ -59,7 +61,7 @@ TweetSearchParams params = TweetSearchParams.builder()
5961
.q("from:elonmusk")
6062
.limit(10L)
6163
.build();
62-
PaginatedTweets paginatedTweets = client.x().tweets().search(params);
64+
TweetSearchResponse response = client.x().tweets().search(params);
6365
```
6466

6567
## Client configuration
@@ -134,7 +136,7 @@ The `withOptions()` method does not affect the original client or service.
134136

135137
To send a request to the X Twitter Scraper API, build an instance of some `Params` class and pass it to the corresponding client method. When the response is received, it will be deserialized into an instance of a Java class.
136138

137-
For example, `client.x().tweets().search(...)` should be called with an instance of `TweetSearchParams`, and it will return an instance of `PaginatedTweets`.
139+
For example, `client.x().tweets().search(...)` should be called with an instance of `TweetSearchParams`, and it will return an instance of `TweetSearchResponse`.
138140

139141
## Immutability
140142

@@ -151,8 +153,8 @@ The default client is synchronous. To switch to asynchronous execution, call the
151153
```java
152154
import com.x_twitter_scraper.api.client.XTwitterScraperClient;
153155
import com.x_twitter_scraper.api.client.okhttp.XTwitterScraperOkHttpClient;
154-
import com.x_twitter_scraper.api.models.PaginatedTweets;
155156
import com.x_twitter_scraper.api.models.x.tweets.TweetSearchParams;
157+
import com.x_twitter_scraper.api.models.x.tweets.TweetSearchResponse;
156158
import java.util.concurrent.CompletableFuture;
157159

158160
// Configures using the `xtwitterscraper.apiKey`, `xtwitterscraper.bearerToken` and `xtwitterscraper.baseUrl` system properties
@@ -163,16 +165,16 @@ TweetSearchParams params = TweetSearchParams.builder()
163165
.q("from:elonmusk")
164166
.limit(10L)
165167
.build();
166-
CompletableFuture<PaginatedTweets> paginatedTweets = client.async().x().tweets().search(params);
168+
CompletableFuture<TweetSearchResponse> response = client.async().x().tweets().search(params);
167169
```
168170

169171
Or create an asynchronous client from the beginning:
170172

171173
```java
172174
import com.x_twitter_scraper.api.client.XTwitterScraperClientAsync;
173175
import com.x_twitter_scraper.api.client.okhttp.XTwitterScraperOkHttpClientAsync;
174-
import com.x_twitter_scraper.api.models.PaginatedTweets;
175176
import com.x_twitter_scraper.api.models.x.tweets.TweetSearchParams;
177+
import com.x_twitter_scraper.api.models.x.tweets.TweetSearchResponse;
176178
import java.util.concurrent.CompletableFuture;
177179

178180
// Configures using the `xtwitterscraper.apiKey`, `xtwitterscraper.bearerToken` and `xtwitterscraper.baseUrl` system properties
@@ -183,7 +185,7 @@ TweetSearchParams params = TweetSearchParams.builder()
183185
.q("from:elonmusk")
184186
.limit(10L)
185187
.build();
186-
CompletableFuture<PaginatedTweets> paginatedTweets = client.x().tweets().search(params);
188+
CompletableFuture<TweetSearchResponse> response = client.x().tweets().search(params);
187189
```
188190

189191
The asynchronous client supports the same options as the synchronous one, except most methods return `CompletableFuture`s.
@@ -309,25 +311,25 @@ To access this data, prefix any HTTP method call on a client or service with `wi
309311
```java
310312
import com.x_twitter_scraper.api.core.http.Headers;
311313
import com.x_twitter_scraper.api.core.http.HttpResponseFor;
312-
import com.x_twitter_scraper.api.models.PaginatedTweets;
313314
import com.x_twitter_scraper.api.models.x.tweets.TweetSearchParams;
315+
import com.x_twitter_scraper.api.models.x.tweets.TweetSearchResponse;
314316

315317
TweetSearchParams params = TweetSearchParams.builder()
316318
.q("from:elonmusk")
317319
.limit(10L)
318320
.build();
319-
HttpResponseFor<PaginatedTweets> paginatedTweets = client.x().tweets().withRawResponse().search(params);
321+
HttpResponseFor<TweetSearchResponse> response = client.x().tweets().withRawResponse().search(params);
320322

321-
int statusCode = paginatedTweets.statusCode();
322-
Headers headers = paginatedTweets.headers();
323+
int statusCode = response.statusCode();
324+
Headers headers = response.headers();
323325
```
324326

325327
You can still deserialize the response into an instance of a Java class if needed:
326328

327329
```java
328-
import com.x_twitter_scraper.api.models.PaginatedTweets;
330+
import com.x_twitter_scraper.api.models.x.tweets.TweetSearchResponse;
329331

330-
PaginatedTweets parsedPaginatedTweets = paginatedTweets.parse();
332+
TweetSearchResponse parsedResponse = response.parse();
331333
```
332334

333335
## Error handling
@@ -425,9 +427,9 @@ Requests time out after 1 minute by default.
425427
To set a custom timeout, configure the method call using the `timeout` method:
426428

427429
```java
428-
import com.x_twitter_scraper.api.models.PaginatedTweets;
430+
import com.x_twitter_scraper.api.models.x.tweets.TweetSearchResponse;
429431

430-
PaginatedTweets paginatedTweets = client.x().tweets().search(
432+
TweetSearchResponse response = client.x().tweets().search(
431433
params, RequestOptions.builder().timeout(Duration.ofSeconds(30)).build()
432434
);
433435
```
@@ -703,17 +705,17 @@ By default, the SDK will not throw an exception in this case. It will throw [`XT
703705
If you would prefer to check that the response is completely well-typed upfront, then either call `validate()`:
704706

705707
```java
706-
import com.x_twitter_scraper.api.models.PaginatedTweets;
708+
import com.x_twitter_scraper.api.models.x.tweets.TweetSearchResponse;
707709

708-
PaginatedTweets paginatedTweets = client.x().tweets().search(params).validate();
710+
TweetSearchResponse response = client.x().tweets().search(params).validate();
709711
```
710712

711713
Or configure the method call to validate the response using the `responseValidation` method:
712714

713715
```java
714-
import com.x_twitter_scraper.api.models.PaginatedTweets;
716+
import com.x_twitter_scraper.api.models.x.tweets.TweetSearchResponse;
715717

716-
PaginatedTweets paginatedTweets = client.x().tweets().search(
718+
TweetSearchResponse response = client.x().tweets().search(
717719
params, RequestOptions.builder().responseValidation(true).build()
718720
);
719721
```

build.gradle.kts

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
plugins {
2-
id("io.github.gradle-nexus.publish-plugin") version "1.1.0"
32
id("org.jetbrains.dokka") version "2.0.0"
43
}
54

@@ -9,7 +8,7 @@ repositories {
98

109
allprojects {
1110
group = "com.x_twitter_scraper.api"
12-
version = "0.1.0" // x-release-please-version
11+
version = "0.2.0" // x-release-please-version
1312
}
1413

1514
subprojects {
@@ -35,15 +34,3 @@ tasks.named("dokkaJavadocCollector").configure {
3534
.filter { it.project.name != "x-twitter-scraper-java" && it.name == "dokkaJavadocJar" }
3635
.forEach { mustRunAfter(it) }
3736
}
38-
39-
nexusPublishing {
40-
repositories {
41-
sonatype {
42-
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
43-
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
44-
45-
username.set(System.getenv("SONATYPE_USERNAME"))
46-
password.set(System.getenv("SONATYPE_PASSWORD"))
47-
}
48-
}
49-
}

buildSrc/build.gradle.kts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
plugins {
22
`kotlin-dsl`
33
kotlin("jvm") version "1.9.20"
4+
id("com.vanniktech.maven.publish") version "0.28.0"
45
}
56

67
repositories {
78
gradlePluginPortal()
9+
mavenCentral()
810
}
911

1012
dependencies {
1113
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.20")
14+
implementation("com.vanniktech:gradle-maven-publish-plugin:0.28.0")
1215
}

buildSrc/src/main/kotlin/x-twitter-scraper.java.gradle.kts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@ repositories {
88
mavenCentral()
99
}
1010

11-
configure<JavaPluginExtension> {
12-
withJavadocJar()
13-
withSourcesJar()
14-
}
15-
1611
java {
1712
toolchain {
1813
languageVersion.set(JavaLanguageVersion.of(21))
@@ -27,10 +22,6 @@ tasks.withType<JavaCompile>().configureEach {
2722
options.release.set(8)
2823
}
2924

30-
tasks.named<Jar>("javadocJar") {
31-
setZip64(true)
32-
}
33-
3425
tasks.named<Jar>("jar") {
3526
manifest {
3627
attributes(mapOf(

0 commit comments

Comments
 (0)