-
Notifications
You must be signed in to change notification settings - Fork 8
Home
Welcome to the WebUntisSharp wiki.
This page will cover all the basics of this library and how to generally use everything but requests.
Take a look at all Requests and Responses, or at the official JSON PDF.
To use WebUntisSharp, you have to import the Library (WebUntisSharp.dll
) in your existing .NET Project.
-
NuGet
-
WebUntisSharp is also available on NuGet! Install by typing
Install-Package WebUntisSharp
in NuGet Package Manager Console. (Or search forWebUntisSharp
on NuGet Package Manager)
-
WebUntisSharp is also available on NuGet! Install by typing
-
Manually
- Download the latest Library (.dll)
- Add the .dll to your Project (Right click
References
in the Project Tree View, clickAdd References
andBrowse
to the.dll
File)
Use the namespace of the Library in a .NET source file (*.cs
, *.vb
, *.fs
, ..) to instantiate a WebUntis object.
Add this line at the very top of your source file:
using mrousavy.APIs.WebUntisSharp;
Create a new WebUntis object to start a Session.
- Synchronous
WebUntis untis = new WebUntis("mrousavy", "password123", "http://<SERVER>/WebUntis/jsonrpc.do");
- Asynchronous
WebUntis untis = await WebUntis.New("mrousavy", "password123", "http://<SERVER>/WebUntis/jsonrpc.do");
Do not use the Synchronous call when you're dealing with User Interface, as the synchronous call will completely block the thread it is called from until it logged in.
Don't forget to dispose the session after you've sent all needed requests.
-
using
-block
using(WebUntis untis = await WebUntis.New(user, pw, server)) {
// WebUntis calls go here
} // WebUntis session has ended and disposed here
-
Dispose()
call
WebUntis untis = await WebUntis.New(user, pw, server);
// WebUntis calls go here
untis.Dispose();
Find out what requests you have to send and what response you get here.
Thanks for using WebUntisSharp!