Cleanup and add URL

This commit is contained in:
Benoit Marty 2021-03-31 09:21:43 +02:00 committed by Valere
parent 0dbd856ac5
commit 715bd29c75
2 changed files with 10 additions and 9 deletions

View file

@ -28,13 +28,15 @@ internal interface SpaceApi {
*
* POST /_matrix/client/r0/rooms/{roomID}/spaces
* {
* "max_rooms_per_space": 5, // The maximum number of rooms/subspaces to return for a given space, if negative unbounded. default: -1.
* "max_rooms_per_space": 5, // The maximum number of rooms/subspaces to return for a given space, if negative unbounded. default: -1.
* "auto_join_only": true, // If true, only return m.space.child events with auto_join:true, default: false, which returns all events.
* "limit": 100, // The maximum number of rooms/subspaces to return, server can override this, default: 100.
* "batch": "opaque_string" // A token to use if this is a subsequent HTTP hit, default: "".
* "limit": 100, // The maximum number of rooms/subspaces to return, server can override this, default: 100.
* "batch": "opaque_string" // A token to use if this is a subsequent HTTP hit, default: "".
* }
*
* MSC 2946 https://github.com/matrix-org/matrix-doc/blob/kegan/spaces-summary/proposals/2946-spaces-summary.md
* Ref:
* - MSC 2946 https://github.com/matrix-org/matrix-doc/blob/kegan/spaces-summary/proposals/2946-spaces-summary.md
* - https://hackmd.io/fNYh4tjUT5mQfR1uuRzWDA
*/
@POST(NetworkConstants.URI_API_PREFIX_PATH_UNSTABLE + "org.matrix.msc2946/rooms/{roomId}/spaces")
fun getSpaces(@Path("roomId") spaceId: String,

View file

@ -21,15 +21,14 @@ import com.squareup.moshi.JsonClass
@JsonClass(generateAdapter = true)
internal data class SpaceSummaryParams(
/** The maximum number of rooms/subspaces to return for a given space, if negative unbounded. default: -1*/
/** The maximum number of rooms/subspaces to return for a given space, if negative unbounded. default: -1 */
@Json(name = "max_rooms_per_space") val maxRoomPerSpace: Int?,
/** The maximum number of rooms/subspaces to return, server can override this, default: 100 */
@Json(name = "limit") val limit: Int?,
/** A token to use if this is a subsequent HTTP hit, default: "".*/
/** A token to use if this is a subsequent HTTP hit, default: "". */
@Json(name = "batch") val batch: String = "",
/** whether we should only return children with the "suggested" flag set.*/
/** whether we should only return children with the "suggested" flag set. */
@Json(name = "suggested_only") val suggestedOnly: Boolean?,
/** whether we should only return children with the "suggested" flag set.*/
/** whether we should only return children with the "suggested" flag set. */
@Json(name = "auto_join_only") val autoJoinedOnly: Boolean?
)