From 248aa69be7c17c68c16a0549155fd3137bd47e7c Mon Sep 17 00:00:00 2001 From: Andy Scherzinger Date: Mon, 1 May 2023 17:04:31 +0200 Subject: [PATCH] Reformat java code Signed-off-by: Andy Scherzinger --- .../java/com/nextcloud/talk/api/NcApi.java | 167 +++++++++++------- 1 file changed, 101 insertions(+), 66 deletions(-) diff --git a/app/src/main/java/com/nextcloud/talk/api/NcApi.java b/app/src/main/java/com/nextcloud/talk/api/NcApi.java index 868dc4d64..6204f5218 100644 --- a/app/src/main/java/com/nextcloud/talk/api/NcApi.java +++ b/app/src/main/java/com/nextcloud/talk/api/NcApi.java @@ -92,16 +92,19 @@ public interface NcApi { */ @GET - Observable getContactsWithSearchParam(@Header("Authorization") String authorization, @Url String url, - @Nullable @Query("shareTypes[]") List listOfShareTypes, @QueryMap Map options); + Observable getContactsWithSearchParam(@Header("Authorization") String authorization, + @Url String url, + @Nullable @Query("shareTypes[]") List listOfShareTypes, + @QueryMap Map options); /* Server URL is: baseUrl + ocsApiVersion + spreedApiVersion + /room */ @GET - Observable getRooms(@Header("Authorization") String authorization, @Url String url, - @Nullable @Query("includeStatus") Boolean includeStatus); + Observable getRooms(@Header("Authorization") String authorization, + @Url String url, + @Nullable @Query("includeStatus") Boolean includeStatus); /* Server URL is: baseUrl + ocsApiVersion + spreedApiVersion + /room/roomToken @@ -118,7 +121,8 @@ public interface NcApi { */ @POST - Observable createRoom(@Header("Authorization") String authorization, @Url String url, + Observable createRoom(@Header("Authorization") String authorization, + @Url String url, @QueryMap Map options); /* @@ -130,7 +134,8 @@ public interface NcApi { @FormUrlEncoded @PUT - Observable renameRoom(@Header("Authorization") String authorization, @Url String url, + Observable renameRoom(@Header("Authorization") String authorization, + @Url String url, @Field("roomName") String roomName); @@ -138,7 +143,7 @@ public interface NcApi { @PUT Observable setConversationDescription(@Header("Authorization") String authorization, @Url String url, - @Field("description") String description); + @Field("description") String description); /* QueryMap items are as follows: @@ -147,8 +152,10 @@ public interface NcApi { Server URL is: baseUrl + ocsApiVersion + spreedApiVersion + /room/roomToken/participants */ @POST - Observable addParticipant(@Header("Authorization") String authorization, @Url String url, - @QueryMap Map options); + Observable addParticipant(@Header("Authorization") String authorization, + @Url String url, + @QueryMap Map options); @POST Observable resendParticipantInvitations(@Header("Authorization") String authorization, @@ -157,24 +164,36 @@ public interface NcApi { // also used for removing a guest from a conversation @Deprecated @DELETE - Observable removeParticipantFromConversation(@Header("Authorization") String authorization, @Url String url, @Query("participant") String participantId); + Observable removeParticipantFromConversation(@Header("Authorization") String authorization, + @Url String url, + @Query("participant") String participantId); @DELETE - Observable removeAttendeeFromConversation(@Header("Authorization") String authorization, @Url String url, @Query("attendeeId") Long attendeeId); + Observable removeAttendeeFromConversation(@Header("Authorization") String authorization, + @Url String url, + @Query("attendeeId") Long attendeeId); @Deprecated @POST - Observable promoteUserToModerator(@Header("Authorization") String authorization, @Url String url, @Query("participant") String participantId); + Observable promoteUserToModerator(@Header("Authorization") String authorization, + @Url String url, + @Query("participant") String participantId); @Deprecated @DELETE - Observable demoteModeratorToUser(@Header("Authorization") String authorization, @Url String url, @Query("participant") String participantId); + Observable demoteModeratorToUser(@Header("Authorization") String authorization, + @Url String url, + @Query("participant") String participantId); @POST - Observable promoteAttendeeToModerator(@Header("Authorization") String authorization, @Url String url, @Query("attendeeId") Long attendeeId); + Observable promoteAttendeeToModerator(@Header("Authorization") String authorization, + @Url String url, + @Query("attendeeId") Long attendeeId); @DELETE - Observable demoteAttendeeFromModerator(@Header("Authorization") String authorization, @Url String url, @Query("attendeeId") Long attendeeId); + Observable demoteAttendeeFromModerator(@Header("Authorization") String authorization, + @Url String url, + @Query("attendeeId") Long attendeeId); /* Server URL is: baseUrl + ocsApiVersion + spreedApiVersion + /room/roomToken/participants/self @@ -205,12 +224,15 @@ public interface NcApi { Observable getPeersForCall(@Header("Authorization") String authorization, @Url String url); @GET - Observable getPeersForCall(@Header("Authorization") String authorization, @Url String url, + Observable getPeersForCall(@Header("Authorization") String authorization, + @Url String url, @QueryMap Map fields); @FormUrlEncoded @POST - Observable joinRoom(@Nullable @Header("Authorization") String authorization, @Url String url, @Nullable @Field("password") String password); + Observable joinRoom(@Nullable @Header("Authorization") String authorization, + @Url String url, + @Nullable @Field("password") String password); @DELETE Observable leaveRoom(@Nullable @Header("Authorization") String authorization, @Url String url); @@ -243,16 +265,16 @@ public interface NcApi { */ @FormUrlEncoded @POST - Observable sendSignalingMessages(@Nullable @Header("Authorization") String authorization, @Url String url, + Observable sendSignalingMessages(@Nullable @Header("Authorization") String authorization, + @Url String url, @Field("messages") String messages); /* Server URL is: baseUrl + ocsApiVersion + spreedApiVersion + /signaling */ @GET - Observable pullSignalingMessages(@Nullable @Header("Authorization") String authorization, @Url - String - url); + Observable pullSignalingMessages(@Nullable @Header("Authorization") String authorization, + @Url String url); /* QueryMap items are as follows: @@ -270,8 +292,10 @@ public interface NcApi { @FormUrlEncoded @PUT - Observable setUserData(@Header("Authorization") String authorization, @Url String url, - @Field("key") String key, @Field("value") String value); + Observable setUserData(@Header("Authorization") String authorization, + @Url String url, + @Field("key") String key, + @Field("value") String value); /* @@ -292,16 +316,15 @@ public interface NcApi { */ @POST - Observable registerDeviceForNotificationsWithNextcloud(@Header("Authorization") - String authorization, - @Url String url, - @QueryMap Map options); + Observable registerDeviceForNotificationsWithNextcloud( + @Header("Authorization") String authorization, + @Url String url, + @QueryMap Map options); @DELETE - Observable unregisterDeviceForNotificationsWithNextcloud(@Header("Authorization") - String authorization, - @Url String url); + Observable unregisterDeviceForNotificationsWithNextcloud( + @Header("Authorization") String authorization, + @Url String url); @FormUrlEncoded @POST @@ -317,11 +340,12 @@ public interface NcApi { */ @DELETE Observable unregisterDeviceForNotificationsWithProxy(@Url String url, - @QueryMap Map fields); + @QueryMap Map fields); @FormUrlEncoded @PUT - Observable setPassword(@Header("Authorization") String authorization, @Url String url, + Observable setPassword(@Header("Authorization") String authorization, + @Url String url, @Field("password") String password); @FormUrlEncoded @@ -341,7 +365,8 @@ public interface NcApi { - "lastKnownMessageId", int, use one from X-Chat-Last-Given */ @GET - Observable> pullChatMessages(@Header("Authorization") String authorization, @Url String url, + Observable> pullChatMessages(@Header("Authorization") String authorization, + @Url String url, @QueryMap Map fields); /* @@ -360,10 +385,12 @@ public interface NcApi { @Field("silent") Boolean sendWithoutNotification); @GET - Observable> getSharedItems(@Header("Authorization") String authorization, @Url String url, - @Query("objectType") String objectType, - @Nullable @Query("lastKnownMessageId") Integer lastKnownMessageId, - @Nullable @Query("limit") Integer limit); + Observable> getSharedItems( + @Header("Authorization") String authorization, + @Url String url, + @Query("objectType") String objectType, + @Nullable @Query("lastKnownMessageId") Integer lastKnownMessageId, + @Nullable @Query("limit") Integer limit); @GET Observable> getSharedItemsOverview(@Header("Authorization") String authorization, @@ -373,7 +400,8 @@ public interface NcApi { @GET Observable getMentionAutocompleteSuggestions(@Header("Authorization") String authorization, - @Url String url, @Query("search") String query, + @Url String url, + @Query("search") String query, @Nullable @Query("limit") Integer limit, @QueryMap Map fields); @@ -393,24 +421,30 @@ public interface NcApi { @FormUrlEncoded @POST - Observable setNotificationLevel(@Header("Authorization") String authorization, @Url String url, @Field("level") int level); + Observable setNotificationLevel(@Header("Authorization") String authorization, + @Url String url, + @Field("level") int level); @FormUrlEncoded @PUT - Observable setReadOnlyState(@Header("Authorization") String authorization, @Url String url, @Field("state") int state); + Observable setReadOnlyState(@Header("Authorization") String authorization, + @Url String url, + @Field("state") int state); @FormUrlEncoded @POST - Observable createRemoteShare(@Nullable @Header("Authorization") String authorization, @Url String url, - @Field("path") String remotePath, - @Field("shareWith") String roomToken, - @Field("shareType") String shareType, - @Field("talkMetaData") String talkMetaData); + Observable createRemoteShare(@Nullable @Header("Authorization") String authorization, + @Url String url, + @Field("path") String remotePath, + @Field("shareWith") String roomToken, + @Field("shareType") String shareType, + @Field("talkMetaData") String talkMetaData); @FormUrlEncoded @PUT Observable setLobbyForConversation(@Header("Authorization") String authorization, - @Url String url, @Field("state") Integer state, + @Url String url, + @Field("state") Integer state, @Field("timer") Long timer); @POST @@ -430,7 +464,7 @@ public interface NcApi { @HEAD Observable> checkIfFileExists(@Header("Authorization") String authorization, - @Url String url); + @Url String url); @GET Call downloadFile(@Header("Authorization") String authorization, @@ -480,7 +514,8 @@ public interface NcApi { @FormUrlEncoded @POST - Observable notificationCalls(@Header("Authorization") String authorization, @Url String url, + Observable notificationCalls(@Header("Authorization") String authorization, + @Url String url, @Field("level") Integer level); @GET @@ -540,11 +575,13 @@ public interface NcApi { @POST - Observable sendReaction(@Header("Authorization") String authorization, @Url String url, + Observable sendReaction(@Header("Authorization") String authorization, + @Url String url, @Query("reaction") String reaction); @DELETE - Observable deleteReaction(@Header("Authorization") String authorization, @Url String url, + Observable deleteReaction(@Header("Authorization") String authorization, + @Url String url, @Query("reaction") String reaction); @GET @@ -586,8 +623,8 @@ public interface NcApi { @FormUrlEncoded @POST Observable setMessageExpiration(@Header("Authorization") String authorization, - @Url String url, - @Field("seconds") Integer seconds); + @Url String url, + @Field("seconds") Integer seconds); @GET Observable getOpenGraph(@Header("Authorization") String authorization, @@ -597,26 +634,24 @@ public interface NcApi { @FormUrlEncoded @POST Observable startRecording(@Header("Authorization") String authorization, - @Url String url, - @Field("status") Integer status); + @Url String url, + @Field("status") Integer status); @DELETE Observable stopRecording(@Header("Authorization") String authorization, - @Url String url); - - @POST - Observable requestAssistance(@Header("Authorization") String authorization, - @Url String url); - - @DELETE - Observable withdrawRequestAssistance(@Header("Authorization") String authorization, @Url String url); @POST - Observable sendCommonPostRequest(@Header("Authorization") String authorization, + Observable requestAssistance(@Header("Authorization") String authorization, @Url String url); @DELETE - Observable sendCommonDeleteRequest(@Header("Authorization") String authorization, - @Url String url); + Observable withdrawRequestAssistance(@Header("Authorization") String authorization, + @Url String url); + + @POST + Observable sendCommonPostRequest(@Header("Authorization") String authorization, @Url String url); + + @DELETE + Observable sendCommonDeleteRequest(@Header("Authorization") String authorization, @Url String url); }