Skip to content
πŸŽ“ Studentenwerk Dresden
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Sources/StuWeDD
Tests
.gitignore
LICENSE
Package.swift
README.md

README.md

πŸŽ“ StuWeDD

Swift library for accessing some of the data the Studentenwerk Dresden has to offer.

Quick Start

Talk to the Cardservice to acquire data about your Emeal card. You will need to have registered for AutoLoad to have the necessary authentication details.

Cardservice.login(username: "1234567890", password: "hunter2") { result in
    guard let service = result.success else { return }
    
    service.carddata { result in
        guard let data = result.success else { return }
        print(data)
    }
    
    let twoDaysAgo = Date().addingTimeInterval(-60 * 60 * 24 * 2)
    let now = Date()
    service.transactions(begin: twoDaysAgo, end: now) { result in
        guard let transactions = result.success else { return }
        print(transactions)
    }
}

Or get current meal information.

Meal.fetch(forMensa: .alteMensa) { result in
    guard let meals = result.success else { return }
    
    for meal in meals {
        print(meal.name)
    }
}

Installation

StuWeDD is available through Swift Package Manager.

.package(url: "https://github.com/kiliankoe/StuWeDD", from: "<#latest#>")
You can’t perform that action at this time.