From 0872034c71cdcdee8059c7fcdd586c675f622d95 Mon Sep 17 00:00:00 2001 From: Mike Christensen Date: Thu, 9 May 2024 10:55:29 +0100 Subject: [PATCH] readme: update code snippets --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index fd045c3..146cd98 100644 --- a/README.md +++ b/README.md @@ -76,9 +76,9 @@ To instantiate the Realtime Data Models SDK, create an [Ably client](https://abl ```typescript import ModelsClient from '@ably-labs/models'; -import { Realtime } from 'ably/promises'; +import { Realtime } from 'ably'; -const ably = new Realtime.Promise({ key: 'YOUR_ABLY_API_KEY' }); +const ably = new Realtime({ key: 'YOUR_ABLY_API_KEY' }); const modelsClient = new ModelsClient({ ably }); ``` @@ -126,7 +126,6 @@ async function updatePost(mutationId: string, content: string) { // create a new model instance called 'post' by passing the sync and merge functions const model = modelsClient.models.get({ - name: 'post', channelName: 'models:posts', sync: sync, merge: merge,