mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-24 10:25:51 +03:00
Keys Backup API now use the unstable prefix (#1503)
This commit is contained in:
parent
84272f5b5d
commit
19ed5a2d3d
3 changed files with 15 additions and 17 deletions
|
@ -1,9 +1,6 @@
|
|||
<component name="ProjectCodeStyleConfiguration">
|
||||
<code_scheme name="Project" version="173">
|
||||
<option name="RIGHT_MARGIN" value="160" />
|
||||
<AndroidXmlCodeStyleSettings>
|
||||
<option name="ARRANGEMENT_SETTINGS_MIGRATED_TO_191" value="true" />
|
||||
</AndroidXmlCodeStyleSettings>
|
||||
<JetCodeStyleSettings>
|
||||
<option name="PACKAGES_TO_USE_STAR_IMPORTS">
|
||||
<value>
|
||||
|
|
|
@ -31,6 +31,7 @@ Other changes:
|
|||
- Fix minor typo in contribution guide (#1512)
|
||||
- Fix self-assignment of callback in `DefaultRoomPushRuleService#setRoomNotificationState` (#1520)
|
||||
- Random housekeeping clean-ups indicated by Lint (#1520, #1541)
|
||||
- Keys Backup API now use the unstable prefix (#1503)
|
||||
|
||||
Changes in RiotX 0.22.0 (2020-06-15)
|
||||
===================================================
|
||||
|
|
|
@ -47,14 +47,14 @@ internal interface RoomKeysApi {
|
|||
* Create a new keys backup version.
|
||||
* @param createKeysBackupVersionBody the body
|
||||
*/
|
||||
@POST(NetworkConstants.URI_API_PREFIX_PATH_R0 + "room_keys/version")
|
||||
@POST(NetworkConstants.URI_API_PREFIX_PATH_UNSTABLE + "room_keys/version")
|
||||
fun createKeysBackupVersion(@Body createKeysBackupVersionBody: CreateKeysBackupVersionBody): Call<KeysVersion>
|
||||
|
||||
/**
|
||||
* Get the key backup last version
|
||||
* If not supported by the server, an error is returned: {"errcode":"M_NOT_FOUND","error":"No backup found"}
|
||||
*/
|
||||
@GET(NetworkConstants.URI_API_PREFIX_PATH_R0 + "room_keys/version")
|
||||
@GET(NetworkConstants.URI_API_PREFIX_PATH_UNSTABLE + "room_keys/version")
|
||||
fun getKeysBackupLastVersion(): Call<KeysVersionResult>
|
||||
|
||||
/**
|
||||
|
@ -63,7 +63,7 @@ internal interface RoomKeysApi {
|
|||
*
|
||||
* @param version version
|
||||
*/
|
||||
@GET(NetworkConstants.URI_API_PREFIX_PATH_R0 + "room_keys/version/{version}")
|
||||
@GET(NetworkConstants.URI_API_PREFIX_PATH_UNSTABLE + "room_keys/version/{version}")
|
||||
fun getKeysBackupVersion(@Path("version") version: String): Call<KeysVersionResult>
|
||||
|
||||
/**
|
||||
|
@ -71,7 +71,7 @@ internal interface RoomKeysApi {
|
|||
* @param version version
|
||||
* @param updateKeysBackupVersionBody the body
|
||||
*/
|
||||
@PUT(NetworkConstants.URI_API_PREFIX_PATH_R0 + "room_keys/version/{version}")
|
||||
@PUT(NetworkConstants.URI_API_PREFIX_PATH_UNSTABLE + "room_keys/version/{version}")
|
||||
fun updateKeysBackupVersion(@Path("version") version: String,
|
||||
@Body keysBackupVersionBody: UpdateKeysBackupVersionBody): Call<Unit>
|
||||
|
||||
|
@ -93,7 +93,7 @@ internal interface RoomKeysApi {
|
|||
* @param version the version of the backup
|
||||
* @param keyBackupData the data to send
|
||||
*/
|
||||
@PUT(NetworkConstants.URI_API_PREFIX_PATH_R0 + "room_keys/keys/{roomId}/{sessionId}")
|
||||
@PUT(NetworkConstants.URI_API_PREFIX_PATH_UNSTABLE + "room_keys/keys/{roomId}/{sessionId}")
|
||||
fun storeRoomSessionData(@Path("roomId") roomId: String,
|
||||
@Path("sessionId") sessionId: String,
|
||||
@Query("version") version: String,
|
||||
|
@ -106,7 +106,7 @@ internal interface RoomKeysApi {
|
|||
* @param version the version of the backup
|
||||
* @param roomKeysBackupData the data to send
|
||||
*/
|
||||
@PUT(NetworkConstants.URI_API_PREFIX_PATH_R0 + "room_keys/keys/{roomId}")
|
||||
@PUT(NetworkConstants.URI_API_PREFIX_PATH_UNSTABLE + "room_keys/keys/{roomId}")
|
||||
fun storeRoomSessionsData(@Path("roomId") roomId: String,
|
||||
@Query("version") version: String,
|
||||
@Body roomKeysBackupData: RoomKeysBackupData): Call<BackupKeysResult>
|
||||
|
@ -117,7 +117,7 @@ internal interface RoomKeysApi {
|
|||
* @param version the version of the backup
|
||||
* @param keysBackupData the data to send
|
||||
*/
|
||||
@PUT(NetworkConstants.URI_API_PREFIX_PATH_R0 + "room_keys/keys")
|
||||
@PUT(NetworkConstants.URI_API_PREFIX_PATH_UNSTABLE + "room_keys/keys")
|
||||
fun storeSessionsData(@Query("version") version: String,
|
||||
@Body keysBackupData: KeysBackupData): Call<BackupKeysResult>
|
||||
|
||||
|
@ -132,7 +132,7 @@ internal interface RoomKeysApi {
|
|||
* @param sessionId the session id
|
||||
* @param version the version of the backup, or empty String to retrieve the last version
|
||||
*/
|
||||
@GET(NetworkConstants.URI_API_PREFIX_PATH_R0 + "room_keys/keys/{roomId}/{sessionId}")
|
||||
@GET(NetworkConstants.URI_API_PREFIX_PATH_UNSTABLE + "room_keys/keys/{roomId}/{sessionId}")
|
||||
fun getRoomSessionData(@Path("roomId") roomId: String,
|
||||
@Path("sessionId") sessionId: String,
|
||||
@Query("version") version: String): Call<KeyBackupData>
|
||||
|
@ -143,7 +143,7 @@ internal interface RoomKeysApi {
|
|||
* @param roomId the room id
|
||||
* @param version the version of the backup, or empty String to retrieve the last version
|
||||
*/
|
||||
@GET(NetworkConstants.URI_API_PREFIX_PATH_R0 + "room_keys/keys/{roomId}")
|
||||
@GET(NetworkConstants.URI_API_PREFIX_PATH_UNSTABLE + "room_keys/keys/{roomId}")
|
||||
fun getRoomSessionsData(@Path("roomId") roomId: String,
|
||||
@Query("version") version: String): Call<RoomKeysBackupData>
|
||||
|
||||
|
@ -152,7 +152,7 @@ internal interface RoomKeysApi {
|
|||
*
|
||||
* @param version the version of the backup, or empty String to retrieve the last version
|
||||
*/
|
||||
@GET(NetworkConstants.URI_API_PREFIX_PATH_R0 + "room_keys/keys")
|
||||
@GET(NetworkConstants.URI_API_PREFIX_PATH_UNSTABLE + "room_keys/keys")
|
||||
fun getSessionsData(@Query("version") version: String): Call<KeysBackupData>
|
||||
|
||||
/* ==========================================================================================
|
||||
|
@ -162,7 +162,7 @@ internal interface RoomKeysApi {
|
|||
/**
|
||||
* Deletes keys from the backup.
|
||||
*/
|
||||
@DELETE(NetworkConstants.URI_API_PREFIX_PATH_R0 + "room_keys/keys/{roomId}/{sessionId}")
|
||||
@DELETE(NetworkConstants.URI_API_PREFIX_PATH_UNSTABLE + "room_keys/keys/{roomId}/{sessionId}")
|
||||
fun deleteRoomSessionData(@Path("roomId") roomId: String,
|
||||
@Path("sessionId") sessionId: String,
|
||||
@Query("version") version: String): Call<Unit>
|
||||
|
@ -170,14 +170,14 @@ internal interface RoomKeysApi {
|
|||
/**
|
||||
* Deletes keys from the backup.
|
||||
*/
|
||||
@DELETE(NetworkConstants.URI_API_PREFIX_PATH_R0 + "room_keys/keys/{roomId}")
|
||||
@DELETE(NetworkConstants.URI_API_PREFIX_PATH_UNSTABLE + "room_keys/keys/{roomId}")
|
||||
fun deleteRoomSessionsData(@Path("roomId") roomId: String,
|
||||
@Query("version") version: String): Call<Unit>
|
||||
|
||||
/**
|
||||
* Deletes keys from the backup.
|
||||
*/
|
||||
@DELETE(NetworkConstants.URI_API_PREFIX_PATH_R0 + "room_keys/keys")
|
||||
@DELETE(NetworkConstants.URI_API_PREFIX_PATH_UNSTABLE + "room_keys/keys")
|
||||
fun deleteSessionsData(@Query("version") version: String): Call<Unit>
|
||||
|
||||
/* ==========================================================================================
|
||||
|
@ -187,6 +187,6 @@ internal interface RoomKeysApi {
|
|||
/**
|
||||
* Deletes a backup.
|
||||
*/
|
||||
@DELETE(NetworkConstants.URI_API_PREFIX_PATH_R0 + "room_keys/version/{version}")
|
||||
@DELETE(NetworkConstants.URI_API_PREFIX_PATH_UNSTABLE + "room_keys/version/{version}")
|
||||
fun deleteBackup(@Path("version") version: String): Call<Unit>
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue