@@ -180,18 +180,8 @@ private okhttp3.Call getUsersIdBookmarksValidateBeforeCall(String id, Integer ma
180180 </table>
181181 */
182182 public GenericTweetsTimelineResponse getUsersIdBookmarks (String id , Integer maxResults , String paginationToken , Set <String > expansions , Set <String > tweetFields , Set <String > userFields , Set <String > mediaFields , Set <String > placeFields , Set <String > pollFields ) throws ApiException {
183- ApiResponse <GenericTweetsTimelineResponse > localVarResp ;
184- try {
185- localVarResp = getUsersIdBookmarksWithHttpInfo (id , maxResults , paginationToken , expansions , tweetFields , userFields , mediaFields , placeFields , pollFields );
186- } catch (ApiException e ) {
187- if (isOAUth2AutoRefreshToken () && e .getCode () == 401 ) {
188- refreshToken ();
189- localVarResp = getUsersIdBookmarksWithHttpInfo (id , maxResults , paginationToken , expansions , tweetFields , userFields , mediaFields , placeFields , pollFields );
190- } else {
191- throw e ;
192- }
193- }
194- return localVarResp != null ? localVarResp .getData () : null ;
183+ ApiResponse <GenericTweetsTimelineResponse > localVarResp = getUsersIdBookmarksWithHttpInfo (id , maxResults , paginationToken , expansions , tweetFields , userFields , mediaFields , placeFields , pollFields );
184+ return localVarResp != null ? localVarResp .getData () : null ;
195185 }
196186
197187 /**
@@ -240,7 +230,6 @@ public ApiResponse<GenericTweetsTimelineResponse> getUsersIdBookmarksWithHttpInf
240230 return localVarApiClient .execute (localVarCall , localVarReturnType );
241231 } catch (ApiException e ) {
242232 e .setErrorObject (localVarApiClient .getJSON ().getGson ().fromJson (e .getResponseBody (), new TypeToken <com .twitter .clientlib .model .ProblemOrError >(){}.getType ()));
243- e .setErrorObjectType (new GenericType <com .twitter .clientlib .model .ProblemOrError >(){});
244233 throw e ;
245234 }
246235 }
@@ -355,18 +344,8 @@ private okhttp3.Call postUsersIdBookmarksValidateBeforeCall(AddBookmarkRequest a
355344 </table>
356345 */
357346 public BookmarkMutationResponse postUsersIdBookmarks (AddBookmarkRequest addBookmarkRequest , String id ) throws ApiException {
358- ApiResponse <BookmarkMutationResponse > localVarResp ;
359- try {
360- localVarResp = postUsersIdBookmarksWithHttpInfo (addBookmarkRequest , id );
361- } catch (ApiException e ) {
362- if (isOAUth2AutoRefreshToken () && e .getCode () == 401 ) {
363- refreshToken ();
364- localVarResp = postUsersIdBookmarksWithHttpInfo (addBookmarkRequest , id );
365- } else {
366- throw e ;
367- }
368- }
369- return localVarResp != null ? localVarResp .getData () : null ;
347+ ApiResponse <BookmarkMutationResponse > localVarResp = postUsersIdBookmarksWithHttpInfo (addBookmarkRequest , id );
348+ return localVarResp != null ? localVarResp .getData () : null ;
370349 }
371350
372351 /**
@@ -408,7 +387,6 @@ public ApiResponse<BookmarkMutationResponse> postUsersIdBookmarksWithHttpInfo(Ad
408387 return localVarApiClient .execute (localVarCall , localVarReturnType );
409388 } catch (ApiException e ) {
410389 e .setErrorObject (localVarApiClient .getJSON ().getGson ().fromJson (e .getResponseBody (), new TypeToken <com .twitter .clientlib .model .ProblemOrError >(){}.getType ()));
411- e .setErrorObjectType (new GenericType <com .twitter .clientlib .model .ProblemOrError >(){});
412390 throw e ;
413391 }
414392 }
@@ -517,18 +495,8 @@ private okhttp3.Call usersIdBookmarksDeleteValidateBeforeCall(String id, String
517495 </table>
518496 */
519497 public BookmarkMutationResponse usersIdBookmarksDelete (String id , String tweetId ) throws ApiException {
520- ApiResponse <BookmarkMutationResponse > localVarResp ;
521- try {
522- localVarResp = usersIdBookmarksDeleteWithHttpInfo (id , tweetId );
523- } catch (ApiException e ) {
524- if (isOAUth2AutoRefreshToken () && e .getCode () == 401 ) {
525- refreshToken ();
526- localVarResp = usersIdBookmarksDeleteWithHttpInfo (id , tweetId );
527- } else {
528- throw e ;
529- }
530- }
531- return localVarResp != null ? localVarResp .getData () : null ;
498+ ApiResponse <BookmarkMutationResponse > localVarResp = usersIdBookmarksDeleteWithHttpInfo (id , tweetId );
499+ return localVarResp != null ? localVarResp .getData () : null ;
532500 }
533501
534502 /**
@@ -570,7 +538,6 @@ public ApiResponse<BookmarkMutationResponse> usersIdBookmarksDeleteWithHttpInfo(
570538 return localVarApiClient .execute (localVarCall , localVarReturnType );
571539 } catch (ApiException e ) {
572540 e .setErrorObject (localVarApiClient .getJSON ().getGson ().fromJson (e .getResponseBody (), new TypeToken <com .twitter .clientlib .model .ProblemOrError >(){}.getType ()));
573- e .setErrorObjectType (new GenericType <com .twitter .clientlib .model .ProblemOrError >(){});
574541 throw e ;
575542 }
576543 }
0 commit comments