citram_api.api.offices¶
Submodules¶
citram_api.api.offices.offices module¶
-
citram_api.api.offices.offices.
get_offices_by_municipality
(cod_municipality, offices_type=None)¶ Returns all the offices from the specified municipality. If offices_type is specified, the results will be filtered, returning only offices of that type.
Example:
get_offices_by_municipality(Municipalities.FUENLABRADA.value, OfficeTypes.OFICINA.value)
Parameters: - cod_municipality (int) – Id of a municipality. Use constants.Municipalities to easily select transport modes ids.
- offices_type (str) – Office type. If set, filters the results by the office type specified. Use constants.OfficeTypes to choose the available types easily. Optional, default: None (no filtering).
Return dict: A dictionary with a list of offices in that municipality.
-
citram_api.api.offices.offices.
get_offices_by_postcode
(post_code, offices_type=None)¶ Returns all the offices from the specified zip code. If offices_type is specified, the results will be filtered, returning only offices of that type.
Example:
get_offices_by_postcode(28004)
Parameters: - post_code (int) – Zip code of the area to look for offices.
- offices_type (str) – Office type. If set, filters the results by the office type specified. Use constants.OfficeTypes to choose the available types easily. Optional, default: None (no filtering).
Return dict: A dictionary with a list of offices from the zip code specified.
-
citram_api.api.offices.offices.
get_offices_by_type
(offices_type)¶ Returns all the offices of the specified type.
Example:
get_offices_by_type(OfficeTypes.OFICINA.value)
Parameters: offices_type (str) – Office type. Use constants.OfficeTypes to choose the available types easily. Return dict: A dictionary with a list of offices of the specified type. { 'offices': { 'Office': [{ 'codOffice': '01_000015', 'name': 'Oficina de Gestión del Consorcio Regional de Transportes de Madrid', 'address': 'Plaza Descubridor Diego de Ordás, 3. 28003 Madrid', 'openTime': 'Horario de atención al público: Lunes a Viernes de 8 a 20 h', 'coordinates': { 'longitude': -3.700064, 'latitude': 40.44086 }, 'type': 'gestion' }, { 'codOffice': '01_000020', 'name': 'Oficina de Gestión de Moncloa', 'address': 'Plaza de la Moncloa, 1. 28008 Madrid', 'openTime': 'Horario de atención al público: Lunes a viernes de 7 a 22 h: Sábados y domingos de 10 a 22 h', 'coordinates': { 'longitude': -3.719445, 'latitude': 40.43502 }, 'type': 'gestion' }, { 'codOffice': '01_000025', 'name': 'Oficina de Gestión de Sol', 'address': 'Plaza de la Puerta del Sol, 6. 28013 Madrid', 'openTime': 'Horario de atención al público: Lunes a viernes de 7 a 22 h; Sábados y domingos de 10 a 22 h', 'coordinates': { 'longitude': -3.703257, 'latitude': 40.416877 }, 'type': 'gestion' }, { 'codOffice': '01_000030', 'name': 'Oficina de Gestión de Príncipe Pío', 'address': 'Paseo de la Florida, 2. 28008 Madrid', 'openTime': 'Horario de atención al público: Lunes a viernes de 7 a 22 h; Sábados de 10 a 22 h', 'coordinates': { 'longitude': -3.720322, 'latitude': 40.421069 }, 'type': 'gestion' }, ... }] } }