### Installing OpenAPI.NET Package (C#) Source: https://github.com/spotware/openapi.net/blob/master/samples/Notebook.Sample/notebook.ipynb Demonstrates how to install the required NuGet package for the OpenAPI.NET library within a .NET interactive notebook environment using the `#r` directive. This is the first step to make the library available for use in the script. ```C# #r "nuget: Spotware.OpenAPI.Net" ``` -------------------------------- ### Install preview SignalR client - Bash Source: https://github.com/spotware/openapi.net/blob/master/samples/Blazor.WebSocket.Sample/wwwroot/lib/microsoft/signalr/README.md Provides command-line instructions using npm or yarn to install the next preview version of the @microsoft/signalr package. Use this to try out upcoming features before they are officially released. ```bash npm install @microsoft/signalr@next # or yarn add @microsoft/signalr@next ``` -------------------------------- ### Installing SignalR Client Preview via npm/yarn (Bash) Source: https://github.com/spotware/openapi.net/blob/master/samples/ASP.NET.Sample/wwwroot/lib/microsoft/signalr/README.md Installs the latest preview version of the @microsoft/signalr JavaScript/TypeScript client library using the `next` tag on npm/yarn. This allows users to test upcoming features or fixes before they are officially released. ```Bash npm install @microsoft/signalr@next # or yarn add @microsoft/signalr@next ``` -------------------------------- ### Installing OpenAPI.NET NuGet Package (PowerShell) Source: https://github.com/spotware/openapi.net/blob/master/docs/index.md This command is used in the NuGet Package Manager Console within Visual Studio or equivalent .NET development environments to add the Spotware.OpenAPI.Net library as a dependency to your project. It fetches the package from Nuget.org. ```PowerShell Install-Package Spotware.OpenAPI.Net ``` -------------------------------- ### Installing SignalR Client Stable via npm/yarn (Bash) Source: https://github.com/spotware/openapi.net/blob/master/samples/ASP.NET.Sample/wwwroot/lib/microsoft/signalr/README.md Installs the latest stable release of the @microsoft/signalr JavaScript/TypeScript client library using either npm or yarn package managers. This is the standard method to add the client dependency to your project. ```Bash npm install @microsoft/signalr # or yarn add @microsoft/signalr ``` -------------------------------- ### Sample Credentials Configuration (JSON) Source: https://github.com/spotware/openapi.net/blob/master/samples/Notebook.Sample/notebook.ipynb Provides an example structure for a `credentials.json` file used to store API authentication details. It includes placeholders for the application's client ID, secret, and a user's access token obtained from the cTrader Open API site. ```JSON { "ClientId": "your app client id", "Secret": "your app secret", "AccessToken": "your access token, create one by using your app playground on open API site" } ``` -------------------------------- ### Connecting to SignalR Hub (JavaScript NodeJS) Source: https://github.com/spotware/openapi.net/blob/master/samples/ASP.NET.Sample/wwwroot/lib/microsoft/signalr/README.md Illustrates how to use the @microsoft/signalr client in a Node.js application. It demonstrates requiring the package, building a connection, setting up an event listener, and starting the connection to interact with a SignalR hub. ```JavaScript const signalR = require("@microsoft/signalr"); let connection = new signalR.HubConnectionBuilder() .withUrl("/chat") .build(); connection.on("send", data => { console.log(data); }); connection.start() .then(() => connection.invoke("send", "Hello")); ``` -------------------------------- ### Connect to SignalR Hub - JavaScript Node.js Source: https://github.com/spotware/openapi.net/blob/master/samples/Blazor.WebSocket.Sample/wwwroot/lib/microsoft/signalr/README.md Demonstrates initializing a SignalR HubConnection in Node.js by requiring the library, setting up a listener for 'send' messages, starting the connection, and invoking a 'send' method. Requires installing the @microsoft/signalr package via npm or yarn. ```javascript const signalR = require("@microsoft/signalr"); let connection = new signalR.HubConnectionBuilder() .withUrl("/chat") .build(); connection.on("send", data => { console.log(data); }); connection.start() .then(() => connection.invoke("send", "Hello")); ``` -------------------------------- ### Install latest SignalR client - Bash Source: https://github.com/spotware/openapi.net/blob/master/samples/Blazor.WebSocket.Sample/wwwroot/lib/microsoft/signalr/README.md Provides command-line instructions using npm or yarn to install the current stable release of the @microsoft/signalr package. This is the standard way to add the library to your project for use in Node.js or bundling for the browser. ```bash npm install @microsoft/signalr # or yarn add @microsoft/signalr ``` -------------------------------- ### Connecting to SignalR Hub (JavaScript Browser) Source: https://github.com/spotware/openapi.net/blob/master/samples/ASP.NET.Sample/wwwroot/lib/microsoft/signalr/README.md Demonstrates how to create a HubConnection in a browser environment, configure the target URL and message handlers, and start the connection to send data. Requires including the SignalR browser script via a