tweets
Get list tweets
package hello.world;
import io.twexapi.sdk.XapiScraper;
import io.twexapi.sdk.models.errors.HTTPValidationError;
import io.twexapi.sdk.models.operations.ListsTweetsRequest;
import io.twexapi.sdk.models.operations.ListsTweetsResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws HTTPValidationError, Exception {
XapiScraper sdk = XapiScraper.builder()
.bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
.build();
ListsTweetsRequest req = ListsTweetsRequest.builder()
.listId("<id>")
.targetCount(277741L)
.build();
ListsTweetsResponse res = sdk.lists().tweets()
.request(req)
.call();
if (res.listTweetsResponse().isPresent()) {
System.out.println(res.listTweetsResponse().get());
}
}
}
| Parameter |
Type |
Required |
Description |
request |
ListsTweetsRequest |
✔️ |
The request object to use for the request. |
ListsTweetsResponse
| Error Type |
Status Code |
Content Type |
| models/errors/HTTPValidationError |
422 |
application/json |
| models/errors/APIException |
4XX, 5XX |
*/* |
tweetsPage
Retrieve a paginated list of list tweets using cursor-based pagination. Each page returns up to 20 tweets. Pass next_cursor from the previous response to continue. Pricing: $0.10 per 1,000 tweets.
package hello.world;
import io.twexapi.sdk.XapiScraper;
import io.twexapi.sdk.models.components.GetListTweetsCursorQuery;
import io.twexapi.sdk.models.errors.HTTPValidationError;
import io.twexapi.sdk.models.operations.ListsTweetsPageResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws HTTPValidationError, Exception {
XapiScraper sdk = XapiScraper.builder()
.bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
.build();
GetListTweetsCursorQuery req = GetListTweetsCursorQuery.builder()
.listId("<id>")
.nextCursor("1234567890")
.build();
ListsTweetsPageResponse res = sdk.lists().tweetsPage()
.request(req)
.call();
if (res.getListTweetsCursorResponse().isPresent()) {
System.out.println(res.getListTweetsCursorResponse().get());
}
}
}
ListsTweetsPageResponse
| Error Type |
Status Code |
Content Type |
| models/errors/HTTPValidationError |
422 |
application/json |
| models/errors/APIException |
4XX, 5XX |
*/* |
Get list subscribers
package hello.world;
import io.twexapi.sdk.XapiScraper;
import io.twexapi.sdk.models.errors.HTTPValidationError;
import io.twexapi.sdk.models.operations.ListsSubscribersRequest;
import io.twexapi.sdk.models.operations.ListsSubscribersResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws HTTPValidationError, Exception {
XapiScraper sdk = XapiScraper.builder()
.bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
.build();
ListsSubscribersRequest req = ListsSubscribersRequest.builder()
.listId("<id>")
.targetCount(440492L)
.build();
ListsSubscribersResponse res = sdk.lists().subscribers()
.request(req)
.call();
if (res.listSubscribersResponse().isPresent()) {
System.out.println(res.listSubscribersResponse().get());
}
}
}
ListsSubscribersResponse
| Error Type |
Status Code |
Content Type |
| models/errors/HTTPValidationError |
422 |
application/json |
| models/errors/APIException |
4XX, 5XX |
*/* |
Get list members
package hello.world;
import io.twexapi.sdk.XapiScraper;
import io.twexapi.sdk.models.errors.HTTPValidationError;
import io.twexapi.sdk.models.operations.ListsMembersRequest;
import io.twexapi.sdk.models.operations.ListsMembersResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws HTTPValidationError, Exception {
XapiScraper sdk = XapiScraper.builder()
.bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
.build();
ListsMembersRequest req = ListsMembersRequest.builder()
.listId("<id>")
.targetCount(685648L)
.build();
ListsMembersResponse res = sdk.lists().members()
.request(req)
.call();
if (res.listMembersResponse().isPresent()) {
System.out.println(res.listMembersResponse().get());
}
}
}
| Parameter |
Type |
Required |
Description |
request |
ListsMembersRequest |
✔️ |
The request object to use for the request. |
ListsMembersResponse
| Error Type |
Status Code |
Content Type |
| models/errors/HTTPValidationError |
422 |
application/json |
| models/errors/APIException |
4XX, 5XX |
*/* |
Retrieve a paginated list of list members using cursor-based pagination. Each page returns up to 20 members. Pass next_cursor from the previous response to continue. Pricing: $0.10 per 1,000 members.
package hello.world;
import io.twexapi.sdk.XapiScraper;
import io.twexapi.sdk.models.components.GetListMembersCursorQuery;
import io.twexapi.sdk.models.errors.HTTPValidationError;
import io.twexapi.sdk.models.operations.ListsMembersPageResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws HTTPValidationError, Exception {
XapiScraper sdk = XapiScraper.builder()
.bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
.build();
GetListMembersCursorQuery req = GetListMembersCursorQuery.builder()
.listId("<id>")
.nextCursor("1234567890")
.build();
ListsMembersPageResponse res = sdk.lists().membersPage()
.request(req)
.call();
if (res.getListMembersCursorResponse().isPresent()) {
System.out.println(res.getListMembersCursorResponse().get());
}
}
}
ListsMembersPageResponse
| Error Type |
Status Code |
Content Type |
| models/errors/HTTPValidationError |
422 |
application/json |
| models/errors/APIException |
4XX, 5XX |
*/* |
Search list
package hello.world;
import io.twexapi.sdk.XapiScraper;
import io.twexapi.sdk.models.components.SearchListQuery;
import io.twexapi.sdk.models.errors.HTTPValidationError;
import io.twexapi.sdk.models.operations.ListsSearchResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws HTTPValidationError, Exception {
XapiScraper sdk = XapiScraper.builder()
.bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
.build();
SearchListQuery req = SearchListQuery.builder()
.query("<value>")
.targetCount(810476L)
.build();
ListsSearchResponse res = sdk.lists().search()
.request(req)
.call();
if (res.searchListResponse().isPresent()) {
System.out.println(res.searchListResponse().get());
}
}
}
| Parameter |
Type |
Required |
Description |
request |
SearchListQuery |
✔️ |
The request object to use for the request. |
ListsSearchResponse
| Error Type |
Status Code |
Content Type |
| models/errors/HTTPValidationError |
422 |
application/json |
| models/errors/APIException |
4XX, 5XX |
*/* |