citram_api.api.others package

Submodules

citram_api.api.others.others module

citram_api.api.others.others.get_municipalities()

Returns the municipalities that are in CRTM system with their ids.

Return dict:A dictionary with the municipalities and ids. It looks like this:
{
    'municipalities': {
        'Municipality': [{
            'codMunicipality': '4273',
            'name': 'ACEBEDA, LA'
        }, {
            'codMunicipality': '4274',
            'name': 'AJALVIR'
        }, {
            'codMunicipality': '4275',
            'name': 'ALAMEDA DEL VALLE'
        }, {
            'codMunicipality': '4276',
            'name': 'ÁLAMO, EL'
        }, {
            'codMunicipality': '4277',
            'name': 'ALCALÁ DE HENARES'
        }, {
            'codMunicipality': '4278',
            'name': 'ALCOBENDAS'
        },
        ...
        ]
    }
}
citram_api.api.others.others.get_transport_modes()

Returns the transport modes available and their id.

Return dict:Transport modes and their ids. The result looks like this:
{
    'modes': {
        'Mode': [{
            'codMode': '4',
            'name': 'METRO'
        }, {
            'codMode': '6',
            'name': 'AUTOBUSES EMT'
        }, {
            'codMode': '5',
            'name': 'CERCANIAS'
        }, {
            'codMode': '10',
            'name': 'METRO LIGERO/TRANVÍA'
        }, {
            'codMode': '8',
            'name': 'AUTOBUSES INTERURBANOS'
        }, {
            'codMode': '9',
            'name': 'AUTOBUSES URBANOS OTROS MUNICIPIOS'
        }, {
            'codMode': '90',
            'name': 'INTERCAMBIADORES'
        }, {
            'codMode': '0',
            'name': 'LARGO RECORRIDO'
        }, {
            'codMode': '1',
            'name': 'APARCAMIENTOS'
        }]
    }
}
citram_api.api.others.others.get_ttp_card_info(ttp_number)

Get information from the specified transport card number.

The number is the concatenation of the last 3 numbers of the first row and all the numbers of the second row. See this image: https://tarjetatransportepublico.crtm.es/CRTM-ABONOS/archivos/img/TTP.jpg

Parameters:ttp_number (str) – The number that identifies a transport card. It must be a string of the last 3 numbers

of the first row and all the numbers of the second row. :return dict: A dictionary with information of the transport card. It has information regarding the titles in that card, expiring dates, purchase dates, title types (young, normal, old, …), among others.

Module contents