Skip to content

DavidOpDeBeeck/Almapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 

Repository files navigation

Due to changes to alma.be this scraper does not work anymore!

Almapi

A RESTful API for the menus on alma.be written in python.

Web Scraper

crontab -e
* 23 * * * python /path/to/script/scraper.py

Add the clean argument to reset the database.

Web API

python /path/to/script/web.py

The web API will by default listen on all public IP addresses.

app.run(host='0.0.0.0')

Endpoints

Get information about all the available alma's

/almas

Example Output

[
    {
        "id": 1, 
        "name": "Gasthuisberg"
    }, 
    {
        "id": 2, 
        "name": "Pauscollege"
    }, ...
]

Get information about a specific alma

/almas/:id

Example Output

{
    "id": 1, 
    "name": "Gasthuisberg"
}

Get the week menu of a specific alma

/almas/:id/menu
/almas/:id/menu/:week
/almas/:id/menu/:week/:year

Example Output

[
    {
        "date": "2015-09-14",
        "menu": {
            "Soup": [
                {
                    "name": "Bloemkoolroomsoep",
                    "price": 2.4,
                    "vegetarian": 1
                }, ...
            ],
            "Main Course": [
                {
                    "name": "Kalkoensteak met boontjes",
                    "price": 3.2,
                    "vegetarian": 0
                }, ...
            ]
        }
    }, ...
]

Test endpoints

About

A RESTful API for the menus on alma.be.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages