Skip to content

Commit

Permalink
making README non-distracting
Browse files Browse the repository at this point in the history
  • Loading branch information
tiholic committed Aug 3, 2020
1 parent 098bf0e commit 9949795
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,18 +155,17 @@ Publishing channel messages

```dart
//publish name and data
await channel.publish(name: "oogway", data: "Yesterday is history, tomorrow is a mystery, but today is a gift");
await channel.publish(name: "oogway", data: {"Yesterday": "history", "tomorrow": "mystery", "today": "gift"});
await channel.publish(name: "oogway", data: [{"Yesterday": {"is": "history"}, "tomorrow": {"mystery": true}, "day_after": null}, "today", "gift"]);
await channel.publish(name: "event1", data: "hello world");
await channel.publish(name: "event1", data: {"hello": "world", "hey": "ably"});
await channel.publish(name: "event1", data: [{"hello": {"great": "world"}, "ably": {"serious": true, "realtime": true}, "key3": null}, "string4", "string5"]);
//publish single message
await channel.publish(message: ably.Message()..name = "oogway"..data = {"hello": "world"});
await channel.publish(message: ably.Message()..name = "event1"..data = {"hello": "world"});
//publish multiple messages
await channel.publish(messages: [
ably.Message()..name="oogway"..data = {"yesterday": "history"},
ably.Message()..name="oogway"..data = {"tomorrow": "mystery"},
ably.Message()..name="oogway"..data = {"today": "gift"}
ably.Message()..name="event1"..data = {"hello": "ably"},
ably.Message()..name="event1"..data = {"hello": "world"}
]);
```

Expand Down

0 comments on commit 9949795

Please sign in to comment.