OpenMensaAPI class
Provides simple access to OpenMensa's API services.
Constructors
- OpenMensaAPI({Client? httpClient, bool unsafe = false})
- Construct a new API instance.
Properties
Methods
-
getCanteen(
int canteenId) → Future< Canteen?> - Returns info about a canteen with the given ID.
-
getCanteens(
{int? page, int? limit}) → Future< List< Canteen> > - Returns all available canteens with optional pagination parameters.
-
getDay(
int canteenId, String dayDate) → Future< Day?> - Returns a day object for the given canteen ID and date.
-
getDays(
int canteenId, {int? page, int? limit}) → Future< List< Day> > - Returns a list of all currently available days for a given canteen with optional pagination parameters.
-
getMeal(
int canteenId, String dayDate, int mealId) → Future< Meal?> - Returns a meal at the given canteen at a given date with the given ID.
-
getMealsOfCanteen(
int canteenId, {int? page, int? limit}) → Future< List< DayMenu> > - Returns all available meals of the given canteen with optional pagination parameters.
-
getMealsOfDay(
int canteenId, String dayDate, {int? page, int? limit}) → Future< List< Meal> > - Returns all meals of the given day in the given canteen with optional pagination parameters.
-
getResponse(
String endpoint, {int? page, int? limit}) → Future< String> - Executes a GET request at the given API endpoint with optional pagination parameters.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited