@@ -9,9 +9,15 @@ package com.nextcloud.talk.api
99
1010import com.nextcloud.talk.models.json.autocomplete.AutocompleteOverall
1111import com.nextcloud.talk.models.json.conversations.RoomOverall
12+ import com.nextcloud.talk.models.json.generic.GenericOverall
13+ import com.nextcloud.talk.models.json.participants.AddParticipantOverall
14+ import retrofit2.http.DELETE
15+ import retrofit2.http.Field
16+ import retrofit2.http.FormUrlEncoded
1217import retrofit2.http.GET
1318import retrofit2.http.Header
1419import retrofit2.http.POST
20+ import retrofit2.http.PUT
1521import retrofit2.http.Query
1622import retrofit2.http.QueryMap
1723import retrofit2.http.Url
@@ -39,4 +45,55 @@ interface NcApiCoroutines {
3945 @Url url : String? ,
4046 @QueryMap options : Map <String , String >?
4147 ): RoomOverall
48+
49+ /*
50+ QueryMap items are as follows:
51+ - "roomName" : "newName"
52+
53+ Server URL is: baseUrl + ocsApiVersion + spreedApiVersion + /room/roomToken
54+ */
55+ @FormUrlEncoded
56+ @PUT
57+ suspend fun renameRoom (
58+ @Header(" Authorization" ) authorization : String? ,
59+ @Url url : String ,
60+ @Field(" roomName" ) roomName : String?
61+ ): GenericOverall
62+
63+ @FormUrlEncoded
64+ @PUT
65+ suspend fun openConversation (
66+ @Header(" Authorization" ) authorization : String? ,
67+ @Url url : String ,
68+ @Field(" scope" ) scope : Int
69+ ): GenericOverall
70+
71+ @FormUrlEncoded
72+ @PUT
73+ suspend fun setConversationDescription (
74+ @Header(" Authorization" ) authorization : String? ,
75+ @Url url : String ,
76+ @Field(" description" ) description : String?
77+ ): GenericOverall
78+
79+ @POST
80+ suspend fun addParticipant (
81+ @Header(" Authorization" ) authorization : String? ,
82+ @Url url : String? ,
83+ @QueryMap options : Map <String , String >?
84+ ): AddParticipantOverall
85+
86+ @POST
87+ suspend fun makeRoomPublic (@Header(" Authorization" ) authorization : String? , @Url url : String ): GenericOverall
88+
89+ @DELETE
90+ suspend fun makeRoomPrivate (@Header(" Authorization" ) authorization : String? , @Url url : String ): GenericOverall
91+
92+ @FormUrlEncoded
93+ @PUT
94+ suspend fun setPassword (
95+ @Header(" Authorization" ) authorization : String? ,
96+ @Url url : String? ,
97+ @Field(" password" ) password : String?
98+ ): GenericOverall
4299}
0 commit comments