Skip to content

deftk/OpenWebWeaver

Repository files navigation

OpenWebWeaver is an API wrapper for the JSON API provided by websites using WebWeaver®.

Getting started

Create credentials

If no token was created:

val credentials = Credentials.fromPassword("<username>", "<password>")

Or if you already have a token:

val credentials = Credentials.fromToken("<username>", "<token>")

Simple login

val apiContext = WebWeaverClient.login(credentials)

Login and create token

val (apiContext, token) = WebWeaverClient.loginCreateToken("<username>", "<password>", "<title>", "<identity>")

Note: Title and identity are used in the web app to identify different tokens.

Obtain user object

val user = apiContext.getUser()

Obtain groups

val groups = user.getGroups()

Obtain request context

Each request made (except login) needs a request context. Classes implementing the IOperatingScope interface (IUser and IGroup) are able to create a request context from the IApiContext (obtained during login).

val requestContext = user.getRequestContext(apiContext)
// or
val requestContext = apiContext.userContext()
val requestContext = group.getRequestContext(apiContext)
// or
val requestContext = apiContext.requestContext(group)

Revoke token (and logout)

user.logoutDestroyToken("<token>", requestContext)

Status

  • Simple login
  • Token login
  • Auto login urls
  • Change user password
  • Profile details

  • Statistics (admin)
  • User management (admin)

  • Messenger
  • Receive quick messages
  • Block users

  • Read emails
  • Write emails
  • Email quota
  • Email attachments
  • Delete emails
  • Move emails
  • Email signature
  • Answer emails
  • Forward emails

  • Get group members
  • Send quick messages

  • Get contacts
  • Add contacts
  • Edit contacts
  • Delete contacts

  • Get calendar
  • Add appointments
  • Edit appointments
  • Delete appointments

  • Get notes
  • Add notes
  • Edit notes
  • Delete notes

  • Read group notifications
  • Add group notifications
  • Edit group notifications
  • Delete group notifications

  • Read tasks
  • Add tasks
  • Edit tasks
  • Delete tasks
  • Mark tasks as done (Not supported by API)

  • Read courselets
  • Parse courselets configuration
  • Courselet templates
  • Import courselets
  • Manage/edit courselets (Only partly supported by API)

  • Forum quota
  • Read forum posts
  • Add forum posts
  • Delete forum posts

  • Get wiki

  • Resource management

  • Get file quota
  • File storage settings
  • Read files
  • Download url
  • Download via API
  • Upload
  • Proxies
  • Create folders
  • Edit file metadata
  • Delete files/folders
  • Trash

  • Session files
  • Session files and file storage

  • Read system notifications
  • Delete system notifications

  • Report users
  • License management
  • Member container join/leave

Disclaimer

This project is neither authorized nor endorsed by DigiOnline GmbH (WebWeaver®).