RepetierServerSharpApi 1.2.5
See the version list below for details.
dotnet add package RepetierServerSharpApi --version 1.2.5
NuGet\Install-Package RepetierServerSharpApi -Version 1.2.5
<PackageReference Include="RepetierServerSharpApi" Version="1.2.5" />
paket add RepetierServerSharpApi --version 1.2.5
#r "nuget: RepetierServerSharpApi, 1.2.5"
// Install RepetierServerSharpApi as a Cake Addin #addin nuget:?package=RepetierServerSharpApi&version=1.2.5 // Install RepetierServerSharpApi as a Cake Tool #tool nuget:?package=RepetierServerSharpApi&version=1.2.5
RepetierServerSharpApi
An C# based library to to interact with a Repetier Server Pro instance via REST-API.
Nuget
Get the latest version from nuget.org<br>
Usage
You can find some usage examples in the TestProject of the source code.
Init a new server
Just create a new RepetierServerPro
object by passing the host, api, port and ssl connection type.
RepetierServerPro _server = new RepetierServerPro(_host, _api, _port, _ssl);
await _server.CheckOnlineAsync();
if (_server.IsOnline)
{
// Sets the first printer active
if (_server.ActivePrinter == null)
await _server.SetPrinterActiveAsync(0, true);
await _server.RefreshAllAsync();
}
Since then, you can access all functions from the RepetierServerPro
object.
Instance
If you want to use the RepetierServerPro
from different places, use the Instance
.
RepetierServerPro.Instance = new RepetierServerPro(_host, _api, _port, _ssl);
await RepetierServerPro.Instance.CheckOnlineAsync();
Aferwards you can use the OctoPrintServer.Instance property to access all functions through your project.
ObservableCollection<RepetierModel> models = await _server.GetModelsAsync();
Available methods
Please find the some usage examples for the methods below.
Get available printers
// Get all printers
ObservableCollection<RepetierPrinter> printers = await _server.GetPrintersAsync();
Get models and groups
// Load all models from the Server
ObservableCollection<RepetierModel> models = await _server.GetModelsAsync();
// Load all modelgroups from the Server
ObservableCollection<string> models = await _server.GetModelGroupsAsync();
Control heating elements
In order to set a temperature for the Extruder, use following command.
// Set Extruder 0 to 30 C°
bool result = await _server.SetExtruderTemperatureAsync(Extruder: 0, Temperature: 30);
To read back the current set and read temperature, use following method.
RepetierPrinterStateRespone state = await _server.GetStateObjectAsync();
if (state != null && state.Printer != null)
{
List<RepetierPrinterExtruder> extruders = state.Printer.Extruder;
if (extruders == null || extruders.Count == 0)
{
Assert.Fail("No extrudes available");
break;
}
RepetierPrinterExtruder extruder = extruders[0];
extruderTemp = extruder.TempRead;
}
Same applies to the heated bed and heated chamber.
Job info and job list
// Returns the current job list
ObservableCollection<RepetierJobListItem> jobs = await _server.GetJobListAsync();
External commands
// Returns all available commands (like shutdown, restart,...)
ObservableCollection<ExternalCommand> commands = await RepetierServerPro.Instance.GetExternalCommandsAsync();
Dependencies
RCoreSharp: https://github.com/AndreasReitberger/CoreSharp
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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 was computed. 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 was computed. 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. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
.NET Framework | net472 is compatible. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | 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.7.2
- Newtonsoft.Json (>= 13.0.1)
- RCoreSharp (>= 1.0.7)
- RestSharp (>= 107.3.0)
- System.Net.Http (>= 4.3.4)
- WebSocket4Net (>= 0.15.2)
-
.NETStandard 2.1
- Newtonsoft.Json (>= 13.0.1)
- RCoreSharp (>= 1.0.7)
- RestSharp (>= 107.3.0)
- System.Net.Http (>= 4.3.4)
- WebSocket4Net (>= 0.15.2)
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 |
---|---|---|
1.3.0-preview | 110 | 4/22/2024 |
1.2.9 | 350 | 6/15/2023 |
1.2.8 | 156 | 5/5/2023 |
1.2.7-preview | 165 | 12/29/2022 |
1.2.6 | 445 | 4/5/2022 |
1.2.5 | 430 | 2/27/2022 |
1.2.4 | 170 | 1/4/2022 |