Skip to content

Commit 46725e7

Browse files
committed
chg: [docs] typos, links to examples
1 parent efded7f commit 46725e7

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ await channel.send("your_handler", "this is my payload", ref)
7777
channel.off(None, ref, callback1)
7878
```
7979

80+
## Examples
81+
see `usage.py`, `sending-receiving-usage.py`, and `fd-usage.py`.
82+
8083
## Sample usage with Supabase
8184

8285
Here's how you could connect to your realtime endpoint using Supabase endpoint. Should be correct as of 13th Feb 2024. Please replace `SUPABASE_ID` and `API_KEY` with your own `SUPABASE_ID` and `API_KEY`. The variables shown below are fake and they will not work if you try to run the snippet.

sending-receiving-usage.py

+3-6
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,9 @@ def callback2(payload):
1111
async def main():
1212

1313
# your phoenix server token
14-
# TOKEN = ""
15-
TOKEN = "SFMyNTY.g2gDYRRuBgBK_9yHjQFiAAFRgA.Fs-vgUBiBiSBtKq9qlKar8ny7SjO0ykXfaLUk2a1TMM"
14+
TOKEN = ""
1615
# your phoenix server URL
17-
# URL = f"ws://127.0.0.1:4000/socket/websocket?token={TOKEN}&vsn=2.0.0"
18-
URL = f"ws://127.0.0.1:4000/feedsocket/websocket?token={TOKEN}&vsn=2.0.0"
16+
URL = f"ws://127.0.0.1:4000/socket/websocket?token={TOKEN}&vsn=2.0.0"
1917

2018
client = Socket(URL)
2119

@@ -26,8 +24,7 @@ async def main():
2624
listen_task = asyncio.ensure_future(client.listen())
2725

2826
# join the channel
29-
# channel = client.set_channel("this:is:my:topic")
30-
channel = client.set_channel("feed:44")
27+
channel = client.set_channel("this:is:my:topic")
3128
await channel.join()
3229

3330
channel.on("test_event", None, callback1)

0 commit comments

Comments
 (0)