Skip to content
Marc Rousavy edited this page May 27, 2017 · 5 revisions

WebUntisSharp Documentation

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.

Import WebUntisSharp

1. Add Binaries

To use WebUntisSharp, you have to import the Library (WebUntisSharp.dll) in your existing .NET Project.

2. Use namespace

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;

3. Create a Session

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.

4. Send your requests

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!

Clone this wiki locally