-
Notifications
You must be signed in to change notification settings - Fork 0
Code Documentation
In this section you find short explanations for methods provided by classes and their instances, that are supposed to be used by developers.
Returns the base URL for the OpenMensa API.
Returns the postfix URL for fetching meals, with placeholders for canteen ID and date.
Returns a postfix for a URL to get all canteens within the area of coordinates, which includes placeholders for longitude, latitude, and a radius.
This function fetches the meals from openmensa.org
for a specified canteen on a specified date using a specified endpoint. Both parameters should be strings, and the date needs to be formatted as 'YYYY-MM-DD'. The endpoint should be a class, e.g. WebClient
. The return type is a JSON string.
This function fetches all canteens within the radius of the coordinates from openmensa.org
. All parameters should be strings. The return type is a Json.
Returns a prebuilt instance of the MWCanteen
where all attributes have been set according to the parameters.
Returns a prebuilt version of the MWCanteen
instance.
Returns the PopUp for choosing the priceGroup.
Return the coordinates of the HPI values for latitude, longitude, and radius.
Return the most recently selected values for latitude, longitude, and radius by the user. If the user has never set these values, they default to the coordinates of the HPI.
Returns a dictionary with canteen ID strings as keys and corresponding canteen name strings as values.
Returns a Collection of CanteenObjects filled in with id, name, date, and meals using the date of today and all in the dictionary, that is stored class side, canteen Ids. The Canteens respectively hold their meals for today. It works by using the MWParser and MWApiWrapper look there for more documentation.
Returns a Collection of CanteenObjects filled in with id, name, date and meals using the date that is given to the function in the dict, that is stored class side, canteen Ids. The Canteens respectively hold their meals for today It works by using the MWParser and MWApiWrapper look there for more documentation.
Requests User Input for latitude, longitude, and radius via a Popup window.
Switches the canteen dictionary to the current canteens in the area of the specified latitude, longitude, and radius.
Switches the canteen dictionary to the canteens in the area of HPI.
Likes or unlikes a meal based on a given event.
Initializes the Mensa Widget label in the Apps menu and opens the widget.
Opens the Mensa Widget with the default location, the HPI.
Prompts the user for latitude, longitude and radius beforehand, then opens the Mensa Widget with this location.
Updates the category across all opened MensaWidgets.
Allows instance creation, assembling all the necessary parts. It calls the initializeFrame
or setUpScreen
based on a previous usage.
Updates the content of the MensaWidget based on the current set date.
Updates the content of the MensaWidget based on the current set time.
Updates the price across all instances of the MWMeal
.
Returns the prebuilt version of the MWMeal
instance.
Takes in a list of MWMeal
instances and polishes them in regards to the specific faults of the OpenMensa data.
Increases the Date by 1 and tells the associated MWFrame
instance to update accordingly.
Decreases the Date by 1 and tells the associated MWFrame
instance to update accordingly.
Switches the time and tells the associated MWFrame
instance to update accordingly.
Translates the Dataset that is input as a String into a Json or multiple Jsons and reads the information provided into instances of a given class. The function returns a list of instances of the provided class, as many as there are valid JSON objects in the Dataset.
Translates a Dataset that is input as a JSON into instances of the given class. The function returns a list of instances of the provided class, as many as there are valid JSON objects in the Dataset.
Sets a desired instance variable on any class instance from a dataset. If no data is provided for the given instance variable, nil
is the default value.
Translates a Dataset that is input as a String into a Dictionary.
Translates a Dataset that is input as a JSON into a Dictionary.