Skip to content

Commit

Permalink
docs: README content ( Fixes #1 )
Browse files Browse the repository at this point in the history
  • Loading branch information
James Brundage committed Nov 27, 2024
1 parent eac4372 commit 241f7fb
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,31 @@
</div>

# 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.

0 comments on commit 241f7fb

Please sign in to comment.