From a0de12f24ed8e78e13df0cc34c4eed7a0f2fe626 Mon Sep 17 00:00:00 2001 From: "Paul \"LeoNerd\" Evans" Date: Thu, 14 Apr 2016 18:35:49 +0100 Subject: [PATCH] More detail on using /sync with ad-hoc filters --- .../howtos/client-server-migrating-from-v1.rst | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/supporting-docs/howtos/client-server-migrating-from-v1.rst b/supporting-docs/howtos/client-server-migrating-from-v1.rst index 276be655..807f0988 100644 --- a/supporting-docs/howtos/client-server-migrating-from-v1.rst +++ b/supporting-docs/howtos/client-server-migrating-from-v1.rst @@ -31,14 +31,18 @@ The following endpoints are now deprecated and replaced by the ``/sync`` API:: The new ``/sync`` API takes an optional ``since`` parameter to distinguish the initial sync from subsequent updates for more events. These return data in a -different format. +different format. Instead of the ``limit`` parameter, supply an ad-hoc filter +that provides the required event count:: + + GET .../sync?filter={"room":{"timeline":{"limit:$limit}}} There is no direct replacement for the per-room ``/rooms/:roomId/initialSync`` endpoint, but the behaviour can be recreated by applying an ad-hoc filter using -the ``filter`` parameter to ``/sync`` that selects only the required room ID. +the ``filter`` parameter to ``/sync`` that selects only the required room ID:: -See the new API documentation for details on the new return -value. + GET .../sync?filter={"room":{"rooms":[$room_id]}} + +See the new API documentation for details on the new return value. The following endpoint is deprecated and has no direct replacement::