https://github.com/dotwee/grips
A Kotlin-implementation of the G.R.I.P.S-Website by OTH Regensburg and University of Regensburg
https://github.com/dotwee/grips
Last synced: 5 months ago
JSON representation
A Kotlin-implementation of the G.R.I.P.S-Website by OTH Regensburg and University of Regensburg
- Host: GitHub
- URL: https://github.com/dotwee/grips
- Owner: dotWee
- License: mit
- Created: 2020-04-19T11:27:24.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-06-11T13:11:20.000Z (about 7 years ago)
- Last Synced: 2025-10-25T06:56:41.732Z (8 months ago)
- Size: 72.3 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# G.R.I.P.S API implementation
The goal of the project is to create a concise implementation of the [G.R.I.P.S](https://elearning.uni-regensburg.de)-API.
## Getting Started
Usage is simple. After importing the library, the Client can be created by calling `GripsClient(loginData: LoginData)` and then invoking `login()`
```
var loginData = LoginData(Realm.HS, "login", "password")
var client = GripsClient(loginData)
client.login()
```
Afterwards, the client-object can be used until the session is expired.
## Usage

The Data-Layer follows an hierarchical approach. The Courses can be requested by ``GripsClient.getCourses()``. Courses consist of 0 to n topic. For performance/bandwith reasons, the topics are not downloaded automatically. To get all topics of a course, ``GripsClient.getTopics(course: Course)`` can be invoked.
A topic can have 0 to n activities. Activities are for now just files.
Example: To get a list of all activities available to an account, we need to ``flatMap()`` twice. First, for flatmapping courses to topics. Seconds, to get all activities for each topic. This would, in the end, look like this:
```
client.getCourses().stream()
.flatMap { client.getTopics(it).stream() }
.flatMap { it.activities.stream() }
.collect(Collectors.toList())
```
## Used Libraries
- [jsoup](https://jsoup.org/) - MIT License
## Disclaimer
This project is in no way affiliated with [OTH Regensburg](https://oth-regensburg.de) and/or [Universität Regensburg](http://www.uni-regensburg.de/). The code is only accessing information, that is already publicly available at [G.R.I.P.S](https://elearning.uni-regensburg.de)