Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

readme: update code snippets #177

Merged
merged 1 commit into from
May 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
```

Expand Down Expand Up @@ -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,
Expand Down
Loading