From 241f7fbb73195148185bde70a2abfef6bfce6d39 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Wed, 27 Nov 2024 00:28:19 -0800 Subject: [PATCH] docs: README content ( Fixes #1 ) --- README.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/README.md b/README.md index 0ab2595..5b5b4f2 100644 --- a/README.md +++ b/README.md @@ -3,4 +3,31 @@ # WebSocket + Work with WebSockets in PowerShell + +WebSocket is a small PowerShell module that helps you work with WebSockets. + +It has a single command: Get-WebSocket. + +Because `Get` is the default verb in PowerShell, you can just call it `WebSocket`. + + +### Installing and Importing + +~~~PowerShell +Install-Module WebSocket -Scope CurrentUser -Force +Import-Module WebSocket -Force -PassThru +~~~ + +### Get-WebSocket + +To connect to a websocket and start listening for results, use [Get-WebSocket](Get-WebSocket.md) + +~~~PowerShell +# Because get is the default verb, we can just say `WebSocket` +# The `-Watch` parameter will continually watch for results +websocket wss://jetstream2.us-east.bsky.network/subscribe?wantedCollections=app.bsky.feed.post -Watch +~~~ + +To stop watching a websocket, simply stop the background job. \ No newline at end of file