From 65c8d69434cdeecda8efc2fdda393bce6caa8916 Mon Sep 17 00:00:00 2001 From: Elijah R <62162399+elijahr2411@users.noreply.github.com> Date: Wed, 8 Mar 2023 19:10:41 -0500 Subject: [PATCH 1/4] Create README.md --- README.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..13cbe98 --- /dev/null +++ b/README.md @@ -0,0 +1,27 @@ +# CollabVMSharp + +CollabVM client library in C#. + +## Usage Example + +```cs +using CollabVMSharp; +// Instantiate the client +var cvm = new CollabVMClient("wss://computernewb.com/collab-vm/vm0", "cvmsharptest", "vm0b0t"); +// Connect to the VM +await cvm.Connect(); +// Send a chat +await cvm.SendChat("What hath god wrought?"); +// Queue a turn, wait until we get the turn +await cvm.GetTurn(); +// Type a string into the VM +await cvm.TypeString("hey sexies"); +// Login as an admin or mod +await cvm.Login("hunter2"); +// Run a command in the QEMU monitor and get a response +await cvm.QEMUMonitor("info block"); +// Send a message when someone takes a turn +cvm.TurnUpdate += async (_, e) => { + await cvm.SendChat($"You have the turn, {e.Queue[0].Username}!"); +}; +``` From 3e9c25b72cade5e5d81d76c6d5ca7e9f0f9111d8 Mon Sep 17 00:00:00 2001 From: Elijah R <62162399+elijahr2411@users.noreply.github.com> Date: Wed, 8 Mar 2023 19:24:52 -0500 Subject: [PATCH 2/4] Update README.md --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 13cbe98..a220894 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,10 @@ CollabVM client library in C#. -## Usage Example +## Usage +The API is well documented with XML documentation, meaning hovering over a method or property in Visual Studio or another IDE should give a pretty good idea of how to do things. For a basic usage example, see below + +### Example ```cs using CollabVMSharp; From af6e22f8039601d9ef437d5a9bf95e4973345ade Mon Sep 17 00:00:00 2001 From: Elijah R <62162399+elijahr2411@users.noreply.github.com> Date: Wed, 8 Mar 2023 19:45:55 -0500 Subject: [PATCH 3/4] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a220894..78d10da 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ The API is well documented with XML documentation, meaning hovering over a metho ### Example ```cs +using System.Console; using CollabVMSharp; // Instantiate the client var cvm = new CollabVMClient("wss://computernewb.com/collab-vm/vm0", "cvmsharptest", "vm0b0t"); @@ -22,7 +23,7 @@ await cvm.TypeString("hey sexies"); // Login as an admin or mod await cvm.Login("hunter2"); // Run a command in the QEMU monitor and get a response -await cvm.QEMUMonitor("info block"); +Console.WriteLine(await cvm.QEMUMonitor("info block")); // Send a message when someone takes a turn cvm.TurnUpdate += async (_, e) => { await cvm.SendChat($"You have the turn, {e.Queue[0].Username}!"); From 542fac1ac064f5a5a1c5f3e4c8cf0a245bfe1a3a Mon Sep 17 00:00:00 2001 From: Elijah R <62162399+elijahr2411@users.noreply.github.com> Date: Wed, 8 Mar 2023 19:46:08 -0500 Subject: [PATCH 4/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 78d10da..217afe4 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ The API is well documented with XML documentation, meaning hovering over a metho ### Example ```cs -using System.Console; +using System; using CollabVMSharp; // Instantiate the client var cvm = new CollabVMClient("wss://computernewb.com/collab-vm/vm0", "cvmsharptest", "vm0b0t");