diff --git a/README.md b/README.md
index 4237d37..474d599 100644
--- a/README.md
+++ b/README.md
@@ -26,6 +26,7 @@ Twitter API v2 available endpoints
- [Authentication](#authentication)
- [Auto Refresh Token](#auto-refresh-token)
- [Rate limits retry mechanism](#rate-limits-retry-mechanism)
+- [Get all fields](#get-all-fields)
- [Documentation for API Endpoints](#documentation-for-api-endpoints)
- [Documentation for Models](#documentation-for-models)
@@ -60,7 +61,7 @@ Add this dependency to your project's POM:
com.twitter
twitter-api-java-sdk
- 2.0.0
+ 2.0.1
```
@@ -75,7 +76,7 @@ mavenLocal() // Needed if the 'twitter-api-java-sdk' jar has been publishe
}
dependencies {
-implementation "com.twitter:twitter-api-java-sdk:2.0.0"
+implementation "com.twitter:twitter-api-java-sdk:2.0.1"
}
```
@@ -89,7 +90,7 @@ mvn clean package
Then manually install the following JARs:
-* `target/twitter-api-java-sdk-2.0.0.jar`
+* `target/twitter-api-java-sdk-2.0.1.jar`
* `target/lib/*.jar`
## Twitter Credentials
@@ -120,7 +121,8 @@ You can use the following objects in order to set the credentials:
```java
-TwitterApi apiInstance = new TwitterApi(new TwitterCredentialsOAuth2(System.getenv("TWITTER_OAUTH2_CLIENT_ID"),
+TwitterApi apiInstance = new TwitterApi(new TwitterCredentialsOAuth2(
+ System.getenv("TWITTER_OAUTH2_CLIENT_ID"),
System.getenv("TWITTER_OAUTH2_CLIENT_SECRET"),
System.getenv("TWITTER_OAUTH2_ACCESS_TOKEN"),
System.getenv("TWITTER_OAUTH2_REFRESH_TOKEN")));
@@ -152,7 +154,8 @@ public class TwitterApiExample {
* Check the 'security' tag of the required APIs in https://api.twitter.com/2/openapi.json in order
* to use the right credential object.
*/
- TwitterApi apiInstance = new TwitterApi(new TwitterCredentialsOAuth2(System.getenv("TWITTER_OAUTH2_CLIENT_ID"),
+ TwitterApi apiInstance = new TwitterApi(new TwitterCredentialsOAuth2(
+ System.getenv("TWITTER_OAUTH2_CLIENT_ID"),
System.getenv("TWITTER_OAUTH2_CLIENT_SECRET"),
System.getenv("TWITTER_OAUTH2_ACCESS_TOKEN"),
System.getenv("TWITTER_OAUTH2_REFRESH_TOKEN")));
@@ -237,6 +240,30 @@ In order to use the retry mechanism call the APIs with an additional parameter `
Read more about Filtered stream and [rate limits](https://developer.twitter.com/en/docs/twitter-api/tweets/filtered-stream/integrate/handling-disconnections)
+## Get all fields
+
+
+The Twitter API v2 endpoints are equipped with a set of parameters called [fields](https://developer.twitter.com/en/docs/twitter-api/fields), which allows you to select just the data that you want from each of the objects in your endpoint response.
+
+If you wish to choose all the fields for a parameter, set only the value "All" instead of setting all the wanted fields names.
+Using "All" with other values is not a valid request.
+The value "All" is not a case-sensitive.
+
+```java
+ Set tweetFields = new HashSet<>();
+ tweetFields.add("author_id");
+ tweetFields.add("id");
+ tweetFields.add("created_at");
+
+ Set userFields = new HashSet<>();
+ userFields.add("ALL");
+
+ Set expansions = new HashSet<>();
+ expansions.add("ALL");
+
+```
+
+
## Documentation for API Endpoints
All URIs are relative to *https://api.twitter.com*
diff --git a/docs/MentionEntity.md b/docs/MentionEntity.md
index 36afc47..cf45410 100644
--- a/docs/MentionEntity.md
+++ b/docs/MentionEntity.md
@@ -9,7 +9,7 @@
|------------ | ------------- | ------------- | -------------|
|**end** | **Integer** | Index (zero-based) at which position this entity ends. The index is exclusive. | |
|**start** | **Integer** | Index (zero-based) at which position this entity starts. The index is inclusive. | |
-|**id** | **String** | Unique identifier of this User. This is returned as a string in order to avoid complications with languages and tools that cannot handle large integers. | |
+|**id** | **String** | Unique identifier of this User. This is returned as a string in order to avoid complications with languages and tools that cannot handle large integers. | [optional] |
|**username** | **String** | The Twitter handle (screen name) of this user. | |
diff --git a/docs/MentionFields.md b/docs/MentionFields.md
index ccc5db7..4b6a55f 100644
--- a/docs/MentionFields.md
+++ b/docs/MentionFields.md
@@ -8,7 +8,7 @@ Represent the portion of text recognized as a User mention, and its start and en
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
-|**id** | **String** | Unique identifier of this User. This is returned as a string in order to avoid complications with languages and tools that cannot handle large integers. | |
+|**id** | **String** | Unique identifier of this User. This is returned as a string in order to avoid complications with languages and tools that cannot handle large integers. | [optional] |
|**username** | **String** | The Twitter handle (screen name) of this user. | |
diff --git a/examples/pom.xml b/examples/pom.xml
index a779e4b..6f6f892 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -16,7 +16,7 @@
com.twitter
twitter-api-java-sdk
- 2.0.0
+ 2.0.1
compile
diff --git a/pom.xml b/pom.xml
index 3702e9b..0a61691 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
twitter-api-java-sdk
jar
twitter-api-java-sdk
- 2.0.0
+ 2.0.1
https://github.com/twitterdev/twitter-api-java-sdk
Twitter API v2 available endpoints
diff --git a/src/main/java/com/twitter/clientlib/ApiClient.java b/src/main/java/com/twitter/clientlib/ApiClient.java
index f682612..f6a35ca 100644
--- a/src/main/java/com/twitter/clientlib/ApiClient.java
+++ b/src/main/java/com/twitter/clientlib/ApiClient.java
@@ -225,7 +225,7 @@ private void init() {
json = new JSON();
// Set default User-Agent.
- setUserAgent("twitter-api-java-sdk/2.0.0");
+ setUserAgent("twitter-api-java-sdk/2.0.1");
authentications = new HashMap();
}
diff --git a/src/main/java/com/twitter/clientlib/JSON.java b/src/main/java/com/twitter/clientlib/JSON.java
index e101fcf..9602c81 100644
--- a/src/main/java/com/twitter/clientlib/JSON.java
+++ b/src/main/java/com/twitter/clientlib/JSON.java
@@ -678,218 +678,218 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri
}
{
- gson = createGson()
- .registerTypeAdapter(Date.class, dateTypeAdapter)
- .registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter)
- .registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter)
- .registerTypeAdapter(LocalDate.class, localDateTypeAdapter)
- .registerTypeAdapter(byte[].class, byteArrayAdapter)
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.AddOrDeleteRulesRequest.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.AddOrDeleteRulesResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.AddRulesRequest.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.AnimatedGif.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.AnimatedGifAllOf.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.BlockUserMutationResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.BlockUserMutationResponseData.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.BlockUserRequest.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.BookmarkAddRequest.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.BookmarkMutationResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.BookmarkMutationResponseData.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.CashtagEntity.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.CashtagFields.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.ClientDisconnectedProblem.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.ClientForbiddenProblem.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.ClientForbiddenProblemAllOf.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.ComplianceJob.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.ConflictProblem.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.ConnectionExceptionProblem.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.ConnectionExceptionProblemAllOf.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.ContextAnnotation.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.ContextAnnotationDomainFields.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.ContextAnnotationEntityFields.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.CreateComplianceJobRequest.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.CreateComplianceJobResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.DeleteRulesRequest.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.DeleteRulesRequestDelete.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.DisallowedResourceProblem.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.DisallowedResourceProblemAllOf.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.DuplicateRuleProblem.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.DuplicateRuleProblemAllOf.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.EntityIndicesInclusiveExclusive.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.EntityIndicesInclusiveInclusive.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Error.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Expansions.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.FieldUnauthorizedProblem.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.FieldUnauthorizedProblemAllOf.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.FilteredStreamingTweetResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.FilteredStreamingTweetResponseMatchingRules.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.FullTextEntities.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.FullTextEntitiesAnnotations.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.FullTextEntitiesAnnotationsAllOf.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.GenericProblem.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Geo.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2ComplianceJobsIdResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2ComplianceJobsResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2ComplianceJobsResponseMeta.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2ListsIdFollowersResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2ListsIdFollowersResponseMeta.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2ListsIdMembersResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2ListsIdResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2ListsIdTweetsResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2SpacesByCreatorIdsResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2SpacesIdBuyersResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2SpacesIdResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2SpacesIdTweetsResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2SpacesResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2SpacesSearchResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2TweetsCountsAllResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2TweetsCountsAllResponseMeta.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2TweetsCountsRecentResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2TweetsIdLikingUsersResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2TweetsIdQuoteTweetsResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2TweetsIdQuoteTweetsResponseMeta.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2TweetsIdResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2TweetsIdRetweetedByResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2TweetsResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2TweetsSampleStreamResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2TweetsSearchAllResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2TweetsSearchAllResponseMeta.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2TweetsSearchRecentResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2TweetsSearchStreamResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2UsersByResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2UsersByUsernameUsernameResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2UsersIdBlockingResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2UsersIdBookmarksResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2UsersIdFollowedListsResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2UsersIdFollowersResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2UsersIdFollowingResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2UsersIdLikedTweetsResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2UsersIdListMembershipsResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2UsersIdMentionsResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2UsersIdMentionsResponseMeta.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2UsersIdMutingResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2UsersIdOwnedListsResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2UsersIdPinnedListsResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2UsersIdResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2UsersIdTimelinesReverseChronologicalResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2UsersIdTweetsResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2UsersMeResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2UsersResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.HashtagEntity.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.HashtagFields.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.InvalidRequestProblem.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.InvalidRequestProblemAllOf.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.InvalidRequestProblemAllOfErrors.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.InvalidRuleProblem.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.ListAddUserRequest.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.ListCreateRequest.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.ListCreateResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.ListCreateResponseData.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.ListDeleteResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.ListDeleteResponseData.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.ListFollowedRequest.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.ListFollowedResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.ListFollowedResponseData.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.ListMutateResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.ListMutateResponseData.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.ListPinnedRequest.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.ListPinnedResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.ListPinnedResponseData.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.ListUnpinResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.ListUpdateRequest.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.ListUpdateResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.ListUpdateResponseData.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.MentionEntity.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.MentionFields.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.ModelList.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.MuteUserMutationResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.MuteUserMutationResponseData.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.MuteUserRequest.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.NonCompliantRulesProblem.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.OperationalDisconnectProblem.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.OperationalDisconnectProblemAllOf.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Photo.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.PhotoAllOf.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Place.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Point.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Poll.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.PollOption.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.ProblemErrors.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.ProblemOrError.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.ReportUsersRequest.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.ReportUsersResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.ReportUsersResponseData.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.ResourceNotFoundProblem.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.ResourceNotFoundProblemAllOf.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.ResourceUnauthorizedProblem.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.ResourceUnauthorizedProblemAllOf.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.ResourceUnavailableProblem.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.ResourceUnavailableProblemAllOf.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Rule.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.RuleNoId.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.RulesCapProblem.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.RulesLookupResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.RulesRequestSummary.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.RulesRequestSummaryOneOf.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.RulesRequestSummaryOneOf1.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.RulesResponseMetadata.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.SearchCount.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Space.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.SpaceTopics.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.StreamingTweetResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Topic.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Tweet.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.TweetAttachments.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.TweetCreateRequest.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.TweetCreateRequestGeo.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.TweetCreateRequestMedia.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.TweetCreateRequestPoll.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.TweetCreateRequestReply.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.TweetCreateResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.TweetCreateResponseData.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.TweetDeleteResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.TweetDeleteResponseData.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.TweetGeo.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.TweetHideRequest.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.TweetHideResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.TweetHideResponseData.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.TweetNonPublicMetrics.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.TweetOrganicMetrics.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.TweetPromotedMetrics.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.TweetPublicMetrics.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.TweetReferencedTweets.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.TweetWithheld.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.UnsupportedAuthenticationProblem.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.UrlEntity.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.UrlFields.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.UrlImage.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.UsageCapExceededProblem.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.UsageCapExceededProblemAllOf.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.User.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.UserEntities.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.UserEntitiesUrl.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.UserPublicMetrics.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.UserWithheld.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.UsersFollowingCreateRequest.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.UsersFollowingCreateResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.UsersFollowingCreateResponseData.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.UsersFollowingDeleteResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.UsersLikesCreateRequest.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.UsersLikesCreateResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.UsersLikesCreateResponseData.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.UsersLikesDeleteResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.UsersRetweetsCreateRequest.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.UsersRetweetsCreateResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.UsersRetweetsCreateResponseData.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.UsersRetweetsDeleteResponse.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Variant.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.Video.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.VideoAllOf.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.VideoAllOfNonPublicMetrics.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.VideoAllOfOrganicMetrics.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.VideoAllOfPromotedMetrics.CustomTypeAdapterFactory())
- .registerTypeAdapterFactory(new com.twitter.clientlib.model.VideoAllOfPublicMetrics.CustomTypeAdapterFactory())
- .create();
+ GsonBuilder gsonBuilder = createGson();
+ gsonBuilder.registerTypeAdapter(Date.class, dateTypeAdapter);
+ gsonBuilder.registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter);
+ gsonBuilder.registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter);
+ gsonBuilder.registerTypeAdapter(LocalDate.class, localDateTypeAdapter);
+ gsonBuilder.registerTypeAdapter(byte[].class, byteArrayAdapter);
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.AddOrDeleteRulesRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.AddOrDeleteRulesResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.AddRulesRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.AnimatedGif.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.AnimatedGifAllOf.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.BlockUserMutationResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.BlockUserMutationResponseData.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.BlockUserRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.BookmarkAddRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.BookmarkMutationResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.BookmarkMutationResponseData.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.CashtagEntity.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.CashtagFields.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.ClientDisconnectedProblem.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.ClientForbiddenProblem.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.ClientForbiddenProblemAllOf.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.ComplianceJob.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.ConflictProblem.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.ConnectionExceptionProblem.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.ConnectionExceptionProblemAllOf.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.ContextAnnotation.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.ContextAnnotationDomainFields.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.ContextAnnotationEntityFields.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.CreateComplianceJobRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.CreateComplianceJobResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.DeleteRulesRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.DeleteRulesRequestDelete.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.DisallowedResourceProblem.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.DisallowedResourceProblemAllOf.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.DuplicateRuleProblem.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.DuplicateRuleProblemAllOf.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.EntityIndicesInclusiveExclusive.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.EntityIndicesInclusiveInclusive.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Error.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Expansions.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.FieldUnauthorizedProblem.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.FieldUnauthorizedProblemAllOf.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.FilteredStreamingTweetResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.FilteredStreamingTweetResponseMatchingRules.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.FullTextEntities.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.FullTextEntitiesAnnotations.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.FullTextEntitiesAnnotationsAllOf.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.GenericProblem.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Geo.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2ComplianceJobsIdResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2ComplianceJobsResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2ComplianceJobsResponseMeta.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2ListsIdFollowersResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2ListsIdFollowersResponseMeta.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2ListsIdMembersResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2ListsIdResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2ListsIdTweetsResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2SpacesByCreatorIdsResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2SpacesIdBuyersResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2SpacesIdResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2SpacesIdTweetsResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2SpacesResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2SpacesSearchResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2TweetsCountsAllResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2TweetsCountsAllResponseMeta.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2TweetsCountsRecentResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2TweetsIdLikingUsersResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2TweetsIdQuoteTweetsResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2TweetsIdQuoteTweetsResponseMeta.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2TweetsIdResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2TweetsIdRetweetedByResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2TweetsResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2TweetsSampleStreamResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2TweetsSearchAllResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2TweetsSearchAllResponseMeta.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2TweetsSearchRecentResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2TweetsSearchStreamResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2UsersByResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2UsersByUsernameUsernameResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2UsersIdBlockingResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2UsersIdBookmarksResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2UsersIdFollowedListsResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2UsersIdFollowersResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2UsersIdFollowingResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2UsersIdLikedTweetsResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2UsersIdListMembershipsResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2UsersIdMentionsResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2UsersIdMentionsResponseMeta.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2UsersIdMutingResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2UsersIdOwnedListsResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2UsersIdPinnedListsResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2UsersIdResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2UsersIdTimelinesReverseChronologicalResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2UsersIdTweetsResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2UsersMeResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Get2UsersResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.HashtagEntity.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.HashtagFields.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.InvalidRequestProblem.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.InvalidRequestProblemAllOf.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.InvalidRequestProblemAllOfErrors.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.InvalidRuleProblem.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.ListAddUserRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.ListCreateRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.ListCreateResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.ListCreateResponseData.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.ListDeleteResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.ListDeleteResponseData.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.ListFollowedRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.ListFollowedResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.ListFollowedResponseData.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.ListMutateResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.ListMutateResponseData.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.ListPinnedRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.ListPinnedResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.ListPinnedResponseData.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.ListUnpinResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.ListUpdateRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.ListUpdateResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.ListUpdateResponseData.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.MentionEntity.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.MentionFields.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.ModelList.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.MuteUserMutationResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.MuteUserMutationResponseData.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.MuteUserRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.NonCompliantRulesProblem.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.OperationalDisconnectProblem.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.OperationalDisconnectProblemAllOf.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Photo.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.PhotoAllOf.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Place.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Point.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Poll.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.PollOption.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.ProblemErrors.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.ProblemOrError.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.ReportUsersRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.ReportUsersResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.ReportUsersResponseData.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.ResourceNotFoundProblem.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.ResourceNotFoundProblemAllOf.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.ResourceUnauthorizedProblem.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.ResourceUnauthorizedProblemAllOf.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.ResourceUnavailableProblem.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.ResourceUnavailableProblemAllOf.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Rule.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.RuleNoId.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.RulesCapProblem.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.RulesLookupResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.RulesRequestSummary.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.RulesRequestSummaryOneOf.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.RulesRequestSummaryOneOf1.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.RulesResponseMetadata.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.SearchCount.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Space.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.SpaceTopics.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.StreamingTweetResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Topic.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Tweet.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.TweetAttachments.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.TweetCreateRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.TweetCreateRequestGeo.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.TweetCreateRequestMedia.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.TweetCreateRequestPoll.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.TweetCreateRequestReply.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.TweetCreateResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.TweetCreateResponseData.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.TweetDeleteResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.TweetDeleteResponseData.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.TweetGeo.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.TweetHideRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.TweetHideResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.TweetHideResponseData.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.TweetNonPublicMetrics.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.TweetOrganicMetrics.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.TweetPromotedMetrics.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.TweetPublicMetrics.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.TweetReferencedTweets.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.TweetWithheld.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.UnsupportedAuthenticationProblem.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.UrlEntity.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.UrlFields.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.UrlImage.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.UsageCapExceededProblem.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.UsageCapExceededProblemAllOf.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.User.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.UserEntities.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.UserEntitiesUrl.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.UserPublicMetrics.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.UserWithheld.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.UsersFollowingCreateRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.UsersFollowingCreateResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.UsersFollowingCreateResponseData.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.UsersFollowingDeleteResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.UsersLikesCreateRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.UsersLikesCreateResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.UsersLikesCreateResponseData.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.UsersLikesDeleteResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.UsersRetweetsCreateRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.UsersRetweetsCreateResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.UsersRetweetsCreateResponseData.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.UsersRetweetsDeleteResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Variant.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.Video.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.VideoAllOf.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.VideoAllOfNonPublicMetrics.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.VideoAllOfOrganicMetrics.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.VideoAllOfPromotedMetrics.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.twitter.clientlib.model.VideoAllOfPublicMetrics.CustomTypeAdapterFactory());
+ gson = gsonBuilder.create();
}
/**
diff --git a/src/main/java/com/twitter/clientlib/api/BookmarksApi.java b/src/main/java/com/twitter/clientlib/api/BookmarksApi.java
index 25d708a..372c439 100644
--- a/src/main/java/com/twitter/clientlib/api/BookmarksApi.java
+++ b/src/main/java/com/twitter/clientlib/api/BookmarksApi.java
@@ -36,6 +36,7 @@
import com.google.gson.reflect.TypeToken;
import java.io.IOException;
+import java.util.HashSet;
import com.twitter.clientlib.model.BookmarkAddRequest;
@@ -167,6 +168,13 @@ public class APIgetUsersIdBookmarksRequest {
private Set pollFields;
private Set userFields;
private Set placeFields;
+ private final Set tweetFieldsAll = new HashSet<>(Arrays.asList("attachments", "author_id", "context_annotations", "conversation_id", "created_at", "entities", "geo", "id", "in_reply_to_user_id", "lang", "non_public_metrics", "organic_metrics", "possibly_sensitive", "promoted_metrics", "public_metrics", "referenced_tweets", "reply_settings", "source", "text", "withheld"));
+ private final Set expansionsAll = new HashSet<>(Arrays.asList("attachments.media_keys", "attachments.poll_ids", "author_id", "entities.mentions.username", "geo.place_id", "in_reply_to_user_id", "referenced_tweets.id", "referenced_tweets.id.author_id"));
+ private final Set mediaFieldsAll = new HashSet<>(Arrays.asList("alt_text", "duration_ms", "height", "media_key", "non_public_metrics", "organic_metrics", "preview_image_url", "promoted_metrics", "public_metrics", "type", "url", "variants", "width"));
+ private final Set pollFieldsAll = new HashSet<>(Arrays.asList("duration_minutes", "end_datetime", "id", "options", "voting_status"));
+ private final Set userFieldsAll = new HashSet<>(Arrays.asList("created_at", "description", "entities", "id", "location", "name", "pinned_tweet_id", "profile_image_url", "protected", "public_metrics", "url", "username", "verified", "withheld"));
+ private final Set placeFieldsAll = new HashSet<>(Arrays.asList("contained_within", "country", "country_code", "full_name", "geo", "id", "name", "place_type"));
+
private APIgetUsersIdBookmarksRequest(String id) {
this.id = id;
@@ -198,7 +206,11 @@ public APIgetUsersIdBookmarksRequest paginationToken(String paginationToken) {
* @return APIgetUsersIdBookmarksRequest
*/
public APIgetUsersIdBookmarksRequest tweetFields(Set tweetFields) {
- this.tweetFields = tweetFields;
+ if(tweetFields != null && tweetFields.size() == 1 && tweetFields.iterator().next().equalsIgnoreCase("ALL")) {
+ this.tweetFields = this.tweetFieldsAll;
+ } else {
+ this.tweetFields = tweetFields;
+ }
return this;
}
@@ -208,7 +220,11 @@ public APIgetUsersIdBookmarksRequest tweetFields(Set tweetFields) {
* @return APIgetUsersIdBookmarksRequest
*/
public APIgetUsersIdBookmarksRequest expansions(Set expansions) {
- this.expansions = expansions;
+ if(expansions != null && expansions.size() == 1 && expansions.iterator().next().equalsIgnoreCase("ALL")) {
+ this.expansions = this.expansionsAll;
+ } else {
+ this.expansions = expansions;
+ }
return this;
}
@@ -218,7 +234,11 @@ public APIgetUsersIdBookmarksRequest expansions(Set expansions) {
* @return APIgetUsersIdBookmarksRequest
*/
public APIgetUsersIdBookmarksRequest mediaFields(Set mediaFields) {
- this.mediaFields = mediaFields;
+ if(mediaFields != null && mediaFields.size() == 1 && mediaFields.iterator().next().equalsIgnoreCase("ALL")) {
+ this.mediaFields = this.mediaFieldsAll;
+ } else {
+ this.mediaFields = mediaFields;
+ }
return this;
}
@@ -228,7 +248,11 @@ public APIgetUsersIdBookmarksRequest mediaFields(Set mediaFields) {
* @return APIgetUsersIdBookmarksRequest
*/
public APIgetUsersIdBookmarksRequest pollFields(Set pollFields) {
- this.pollFields = pollFields;
+ if(pollFields != null && pollFields.size() == 1 && pollFields.iterator().next().equalsIgnoreCase("ALL")) {
+ this.pollFields = this.pollFieldsAll;
+ } else {
+ this.pollFields = pollFields;
+ }
return this;
}
@@ -238,7 +262,11 @@ public APIgetUsersIdBookmarksRequest pollFields(Set pollFields) {
* @return APIgetUsersIdBookmarksRequest
*/
public APIgetUsersIdBookmarksRequest userFields(Set userFields) {
- this.userFields = userFields;
+ if(userFields != null && userFields.size() == 1 && userFields.iterator().next().equalsIgnoreCase("ALL")) {
+ this.userFields = this.userFieldsAll;
+ } else {
+ this.userFields = userFields;
+ }
return this;
}
@@ -248,7 +276,11 @@ public APIgetUsersIdBookmarksRequest userFields(Set userFields) {
* @return APIgetUsersIdBookmarksRequest
*/
public APIgetUsersIdBookmarksRequest placeFields(Set placeFields) {
- this.placeFields = placeFields;
+ if(placeFields != null && placeFields.size() == 1 && placeFields.iterator().next().equalsIgnoreCase("ALL")) {
+ this.placeFields = this.placeFieldsAll;
+ } else {
+ this.placeFields = placeFields;
+ }
return this;
}
@@ -422,6 +454,7 @@ private okhttp3.Call postUsersIdBookmarksAsync(BookmarkAddRequest bookmarkAddReq
public class APIpostUsersIdBookmarksRequest {
private final BookmarkAddRequest bookmarkAddRequest;
private final String id;
+
private APIpostUsersIdBookmarksRequest(BookmarkAddRequest bookmarkAddRequest, String id) {
this.bookmarkAddRequest = bookmarkAddRequest;
@@ -600,6 +633,7 @@ private okhttp3.Call usersIdBookmarksDeleteAsync(String id, String tweetId, fina
public class APIusersIdBookmarksDeleteRequest {
private final String id;
private final String tweetId;
+
private APIusersIdBookmarksDeleteRequest(String id, String tweetId) {
this.id = id;
diff --git a/src/main/java/com/twitter/clientlib/api/ComplianceApi.java b/src/main/java/com/twitter/clientlib/api/ComplianceApi.java
index cba9c3a..53dbd1b 100644
--- a/src/main/java/com/twitter/clientlib/api/ComplianceApi.java
+++ b/src/main/java/com/twitter/clientlib/api/ComplianceApi.java
@@ -36,6 +36,7 @@
import com.google.gson.reflect.TypeToken;
import java.io.IOException;
+import java.util.HashSet;
import com.twitter.clientlib.model.CreateComplianceJobRequest;
@@ -127,6 +128,7 @@ private okhttp3.Call createBatchComplianceJobAsync(CreateComplianceJobRequest cr
public class APIcreateBatchComplianceJobRequest {
private final CreateComplianceJobRequest createComplianceJobRequest;
+
private APIcreateBatchComplianceJobRequest(CreateComplianceJobRequest createComplianceJobRequest) {
this.createComplianceJobRequest = createComplianceJobRequest;
@@ -301,6 +303,8 @@ private okhttp3.Call getBatchComplianceJobAsync(String id, Set complianc
public class APIgetBatchComplianceJobRequest {
private final String id;
private Set complianceJobFields;
+ private final Set complianceJobFieldsAll = new HashSet<>(Arrays.asList("created_at", "download_expires_at", "download_url", "id", "name", "resumable", "status", "type", "upload_expires_at", "upload_url"));
+
private APIgetBatchComplianceJobRequest(String id) {
this.id = id;
@@ -312,7 +316,11 @@ private APIgetBatchComplianceJobRequest(String id) {
* @return APIgetBatchComplianceJobRequest
*/
public APIgetBatchComplianceJobRequest complianceJobFields(Set complianceJobFields) {
- this.complianceJobFields = complianceJobFields;
+ if(complianceJobFields != null && complianceJobFields.size() == 1 && complianceJobFields.iterator().next().equalsIgnoreCase("ALL")) {
+ this.complianceJobFields = this.complianceJobFieldsAll;
+ } else {
+ this.complianceJobFields = complianceJobFields;
+ }
return this;
}
@@ -493,6 +501,8 @@ public class APIlistBatchComplianceJobsRequest {
private final String type;
private String status;
private Set complianceJobFields;
+ private final Set complianceJobFieldsAll = new HashSet<>(Arrays.asList("created_at", "download_expires_at", "download_url", "id", "name", "resumable", "status", "type", "upload_expires_at", "upload_url"));
+
private APIlistBatchComplianceJobsRequest(String type) {
this.type = type;
@@ -504,7 +514,7 @@ private APIlistBatchComplianceJobsRequest(String type) {
* @return APIlistBatchComplianceJobsRequest
*/
public APIlistBatchComplianceJobsRequest status(String status) {
- this.status = status;
+
return this;
}
@@ -514,7 +524,11 @@ public APIlistBatchComplianceJobsRequest status(String status) {
* @return APIlistBatchComplianceJobsRequest
*/
public APIlistBatchComplianceJobsRequest complianceJobFields(Set complianceJobFields) {
- this.complianceJobFields = complianceJobFields;
+ if(complianceJobFields != null && complianceJobFields.size() == 1 && complianceJobFields.iterator().next().equalsIgnoreCase("ALL")) {
+ this.complianceJobFields = this.complianceJobFieldsAll;
+ } else {
+ this.complianceJobFields = complianceJobFields;
+ }
return this;
}
diff --git a/src/main/java/com/twitter/clientlib/api/GeneralApi.java b/src/main/java/com/twitter/clientlib/api/GeneralApi.java
index 5514fe2..4e98f9a 100644
--- a/src/main/java/com/twitter/clientlib/api/GeneralApi.java
+++ b/src/main/java/com/twitter/clientlib/api/GeneralApi.java
@@ -36,6 +36,7 @@
import com.google.gson.reflect.TypeToken;
import java.io.IOException;
+import java.util.HashSet;
@@ -114,6 +115,7 @@ private okhttp3.Call getOpenApiSpecAsync(final ApiCallback