Closed kiliankoe closed 7 years ago
Is it necessary to get meals for anything but the current day? Just threw some rss feed parsing into StuWeDD to enable fetching of current meal data. Unfortunately the feed only exists for the current day afaict (I sent a mail inquiring about this though).
It includes the following data 😊
public struct Meal {
public let id: String
public let name: String
public let mensa: String
public let price: Price?
public let url: URL
public let imageURL: URL?
public let isSoldOut: Bool
public struct Price {
public let student: Double
public let employee: Double
}
public static func fetch(session: URLSession = default, completion: @escaping (Result<[Meal]>) -> Void)
public static func fetch(forMensa mensa: String, session: URLSession = default, completion: @escaping (Result<[Meal]>) -> Void)
}
Does the rss feed for the current day even contain all information? I think it would be great to have additional informations like allergy information as well (which is currently not part of the feed afaik. Maybe even more important: price!
Unfortunately ingredients/allergens aren't listed, that's correct 😢 Price is there though.
Will look into the best way of getting as much data as possible 😊
As described in https://github.com/HTWDD/htwcampus/commit/21d1e25aa87bb1e16aaca8b37cfd3bc6fb10d1e3#commitcomment-25267480
Android Implementation: https://github.com/HTWDD/HTWDresden/blob/master/app/src/main/java/de/htwdd/htwdresden/types/Meal.java#L60-L73