From c092f06068b553f5f4903075dc0eeeb98db80765 Mon Sep 17 00:00:00 2001 From: Timo Date: Sat, 22 Aug 2020 21:38:01 +0200 Subject: [PATCH] docs: /sync --- src/client_server/sync.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/client_server/sync.rs b/src/client_server/sync.rs index ab41642e..2307f028 100644 --- a/src/client_server/sync.rs +++ b/src/client_server/sync.rs @@ -14,6 +14,17 @@ use std::{ time::Duration, }; +/// # `GET /_matrix/client/r0/sync` +/// +/// Synchronize the client's state with the latest state on the server. +/// +/// - This endpoint takes a `since` parameter which should be the `next_batch` value from a +/// previous request. +/// - Calling this endpoint without a `since` parameter will return all recent events, the state +/// of all rooms and more data. This should only be called on the initial login of the device. +/// - To get incremental updates, you can call this endpoint with a `since` parameter. This will +/// return all recent events, state updates and more data that happened since the last /sync +/// request. #[cfg_attr( feature = "conduit_bin", get("/_matrix/client/r0/sync", data = "")