ManageXRAPI.Client
1.0.0
dotnet add package ManageXRAPI.Client --version 1.0.0
NuGet\Install-Package ManageXRAPI.Client -Version 1.0.0
<PackageReference Include="ManageXRAPI.Client" Version="1.0.0" />
<PackageVersion Include="ManageXRAPI.Client" Version="1.0.0" />
<PackageReference Include="ManageXRAPI.Client" />
paket add ManageXRAPI.Client --version 1.0.0
#r "nuget: ManageXRAPI.Client, 1.0.0"
#:package ManageXRAPI.Client@1.0.0
#addin nuget:?package=ManageXRAPI.Client&version=1.0.0
#tool nuget:?package=ManageXRAPI.Client&version=1.0.0
ManageXR API C# Wrapper
Welcome to the ManageXR API C# Wrapper! This library provides a simple and convenient way to interact with the ManageXR API using C#.
Table of Contents
Installation
Install-Package ManageXRAPI.Client
Authentication
To authenticate with the ManageXR API, you'll need your Organisation Id as well as a Key and Secret. You can obtain this from your ManageXR account settings from the related Organisation.
var credentials = new AuthCredentials("your-organisation-id", "your-key-id", "your-key-secret");
When using the ManageXRAPI.Extensions
package, you can utilise the AddManageXRClient
function to easily create an instance within your ServiceCollection
. This function retrieves credentials stored in your appsettings.json
, an example of this can be found below:
// appsettings.json
{
"ManageXR": {
"OrganisationId": "",
"KeyId": "",
"KeySecret": ""
}
}
Usage
Here's a quick example to get you started with the ManageXR API C# Wrapper:
using System;
using ManageXRCSharpWrapper;
namespace ManageXRExample
{
class Program
{
static void Main(string[] args)
{
// Store Credentials
var credentials = new AuthCredentials("your-organisation-id", "your-key-id", "your-key-secret");
// Initialise the API client
var mxrClient = new ManageXRClient(credentials, new HttpClient());
// Get device information
var devices = mxrClient.ListDevices();
foreach(var device in devices)
{
Console.WriteLine($"Device Name: {device.Name}");
Console.WriteLine($"Device Serial: {device.Serial}");
}
// Update device settings
mxrClient.EditDevice("device-id", new EditDeviceOptions
{
Name = "Updated Device Name",
// Add other update options as needed
});
Console.WriteLine("Device updated successfully.");
}
}
}
Supported Endpoints
The ManageXR API C# Wrapper supports various API calls, including:
ListDevices()
: Retrieve a list of all devicesGetDevice(string deviceId)
: Retrieve a specific device with the matchingdeviceId
deviceId
in this context refers to a headset's Hardware IDEditDevice(string deviceId, EditDeviceOptions options)
: Edit various settings of a specific device.SendCommand(string deviceId, DeviceCommand deviceCommand)
: Trigger a command on a specific device.SendBatchCommand(BatchCommand batchCommand)
: Trigger a command on a list of headsetsSetPauseUpdates(bool pauseUpdates, params string[] deviceIds)
: Enable/Disable Configuration Updates on a set of devices.ListConfigurations
: List all the configurations associated with the organisationGetConfiguration(string configurationId)
: Get a specific configuration using the configuration id
Refer to the official ManageXR API documentation for detailed information on all available methods.
For any missing endpoints not implemented in the ManageXR API C# Wrapper, feel free to make an issue or submit a Pull Request!
Contributing
We welcome contributions to the ManageXR API C# Wrapper! If you'd like to contribute, please fork the repository and submit a pull request!
When it comes to testing, add an appsettings.test.json
file to the ManageXRAPI.Tests
project and add your credentials in there, as structured above.
You will need to modify the
TestCase
parameters that reference<device-id-here>
and<configuration-id-here>
to values that exist in the organisation you're using to test these functions.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
.NET Framework | net461 was computed. net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.6.2
- Newtonsoft.Json (>= 13.0.3)
- System.Net.Http.Json (>= 7.0.1)
-
.NETStandard 2.0
- Newtonsoft.Json (>= 13.0.3)
- System.Net.Http.Json (>= 7.0.1)
-
.NETStandard 2.1
- Newtonsoft.Json (>= 13.0.3)
- System.Net.Http.Json (>= 7.0.1)
-
net6.0
- Newtonsoft.Json (>= 13.0.3)
- System.Net.Http.Json (>= 7.0.1)
-
net7.0
- Newtonsoft.Json (>= 13.0.3)
- System.Net.Http.Json (>= 7.0.1)
-
net8.0
- Newtonsoft.Json (>= 13.0.3)
- System.Net.Http.Json (>= 7.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|