A library for getting SpeedRoommatingEvents without worrying about it.
Get all events: unordered, unfiltered
let ep = SpeedRoommatingEventRepo.default
ep.listAllEvents {
result in
switch result {
case .failure:
break
case let .success(events):
// Do things with events
}
}
Get all events: ordered
let ep = SpeedRoommatingEventRepo.default
ep.listAllEventsOrderedByStartTimeAscending {
result in
switch result {
case .failure:
break
case let .success(events):
// Do things with sorted events
}
}
Get ordered events on or after specified date
let ep = SpeedRoommatingEventRepo.default
ep.listAllEventsOnOrAfter(date: Date()) {
result in
switch result {
case .failure:
break;
case let .success(filteredEvents):
// Do things with events you might actually be able to go to
}
}
It is possible to use a different event source - see tests
link |
Stars: 0 |
Last commit: 3 years ago |
Improve client's ability to handle errors by allowing them to access those provided by the repo
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics