Code Monkey home page Code Monkey logo

mensa-bremen-api's Introduction

Uni Bremen Mensa API

This is an API that scrapes the Studentenwerk Bremen website and returns the foodplan as JSON.

Since im not actively studying at the University of Bremen anymore feel free to message me about helping or maintaining this project.

Endpoints

/ - Root Endpoint

Returns the foodplan of today and the following 4 days.

/:day - Endpoint

Returns the foodplan of the day :day's after today. So api.mensabremen.de/0 will return todays plan, while mensa.legacymode.de/api/1 will return the foodplan of the day after. Weekends will be skipped in this numeration.

Roadmap

Contribution

If you want to Contribute just send a Pull request or write me an email.

Demo

The API is online at api.mensabremen.de. See the foodplan at mensabremen.de.

mensa-bremen-api's People

Contributors

cristovilla avatar dependabot[bot] avatar greenkeeper[bot] avatar leroid-hub avatar stevenkowalzik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

mensa-bremen-api's Issues

Loading Times [Performance]

At the moment the html is accessed from the cache, then scraped. This leads to long loading times, even though a cache is used. Instead the data itself should be cached and html should only be requested and scraped if the cache exceeds the TTL.

Double Spaces

There are still mutiple spaces instead of a single space in the dish name. There is a regex that should filter out double spaces, but it does not seem to work for all cases.

Implement Drink Prices

There are different drinks provided in the Mensa, these could be statically served aswell from e.g. a json file that is read.
Access to the Mensa Bremen is needed to see these prices.

Dividing different options

Aufläufe & Gratin, Beilage, Suppen and Salate have multiple options. They have to be seperate in the response.

Unhandled Rejection Error

On accessing the API the program throws 2 unhandled promise rejection errors. These should be handled.

Tests

No tests yet, for automated updates etc. we should implement basic tests that garantuee the apis functions. Most importantly we should test for the DOM Structure of the scraped website. This should also ensure that the frontend continues to work: https://github.com/LegacyMode/Bremen-Mensa-Frontend

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.