pyemtmad.types module¶
This file contains type definitions for the data returned by the API.
-
class
pyemtmad.types.
Arrival
(**kwargs)¶ Bases:
object
-
stop_id
¶ int – Stop ID.
-
line_id
¶ string – Line ID.
-
is_header
¶ bool – Whether or not the stop is header of the line.
-
destination
¶ string – Destination of the bus.
-
bus_id
¶ int – Bus ID.
-
time_left
¶ int – Seconds remaining until bus arrives. If this value is >= 999999, then 20+ minutes remain.
-
distance
¶ int – distance of the bus in meters.
-
longitude
¶ double – Longitude of the bus in decimal degrees
-
latitude
¶ double – Latitude of the bus in decimal degrees
-
position_type
¶ string – Real or estimate position
-
_json
¶ dict – Original API response.
-
-
class
pyemtmad.types.
BusGroupItem
(**kwargs)¶ Bases:
object
-
id
¶ int – Group ID.
-
description
¶ string – Group description.
-
_json
¶ dict – Original API response.
-
-
class
pyemtmad.types.
CalendarItem
(**kwargs)¶ Bases:
object
-
date
¶ string – Date in DD/MM/YYYY H:mm:ss format.
-
day_type
¶ string – Day type. May be: - labour (LA) - friday (F) - saturday (SA) - festive (FE)
-
strike
¶ boolean – Whether there is strike on this day or not.
-
day_of_week
¶ string – Day of the week (in english) obtained from single character Spanish representation.
-
week
¶ int – Week number.
-
month
¶ int – Month number.
-
trimester
¶ int – Trimester number.
-
quarter
¶ int – Quarter number.
-
semester
¶ int – Semester number.
-
year
¶ int – Year number.
-
_json
¶ dict – Original API response.
-
-
class
pyemtmad.types.
DayType
(**kwargs)¶ Bases:
object
-
day_type
¶ string – Day type. May be: - labour (LA) - friday (F) - saturday (SA) - festive (FE)
-
dir_forward
¶ Direction – Forward line direction details.
-
dir_backward
¶ Direction – Backward line direction details.
-
_json
¶ dict – Original API response.
-
-
class
pyemtmad.types.
Direction
(**kwargs)¶ Bases:
object
-
start_time
¶ string – Starting time in HH:mm.
-
end_time
¶ string – Ending time in HH:mm.
-
minimum_frequency
¶ int – Minimum frequency of buses in minutes.
-
maximum_frequency
¶ int – Maximum frequency of buses in minutes.
-
frequency_description
¶ string – Human readable description of the frequency (in extended call).
-
_json
¶ dict – Original API response.
-
-
class
pyemtmad.types.
GeoGroupItem
(**kwargs)¶ Bases:
object
-
id
¶ int – group ID.
-
subgroup
¶ int – subgroup ID.
-
start_date
¶ int – starting date timestamp.
-
end_date
¶ int – ending date timestamp.
-
description
¶ string – description text.
-
_json
¶ dict – Original API response.
-
-
class
pyemtmad.types.
IconDescription
(**kwargs)¶ Bases:
object
-
classification
¶ str – Localized name of the group of the icon.
-
classification_spanish
¶ str – Original name of the group of the icon.
-
description
¶ str – Description of the referenced element.
-
icon_name
¶ str – Name of the element.
-
url_icon
¶ str – URL to the icon.
-
_json
¶ dict – Original API response.
-
-
class
pyemtmad.types.
InfoParkingPoi
(**kwargs)¶ Bases:
object
-
id
¶ int – Parking or POI ID. They are identified with (family, id).
-
name
¶ str – Parking or POI name.
-
address
¶ str – Parking or POI address.
-
type
¶ str – Parking or POI type.
-
type_code
¶ str – Parking or POI type code.
-
administrative_area
¶ str – Administrative area in which the parking or POI is located. This is usually ‘Madrid’.
-
area_code
¶ int – Postal code of the parking or POI.
-
category
¶ str – Parking or POI category name.
-
category_code
¶ str – Parking or POI category code.
-
country
¶ str – Country in which the parking or POI is located (‘Spain’).
-
email
¶ str – Public email of the POI.
-
family
¶ str – Family of the parking or POI.
-
family_code
¶ str – Unique code of the family.
-
fax
¶ str – Public fax of the POI.
-
url_icon
¶ str – URL to the icon representing the parking or POI.
-
state
¶ str – State in which the parking or POI is located.
-
telephone
¶ str – Public telephone of the POI.
-
town
¶ str – Town in which the parking or POI is located.
-
latitude
¶ double – Latitude of the parking or POI in decimal degrees.
-
longitude
¶ double – Longitude of the parking or POI in decimal degrees.
-
_json
¶ dict – Original API response.
-
-
class
pyemtmad.types.
Line
(**kwargs)¶ Bases:
object
-
id
¶ int – Line ID.
-
label
¶ string – Line label.
-
date
¶ string – Date in which information was updated (dd/mm/YYYY).
-
header_a
¶ string – Name of the end of the line A.
-
header_b
¶ string – Name of the end of the line B.
-
incidents
¶ int – Number of incidents in the line.
-
day_types
¶ list[DayType]
-
_json
¶ dict – Original API response.
-
-
class
pyemtmad.types.
LineInfo
(**kwargs)¶ Bases:
object
-
day_type
¶ string – Day type. May be: - labour (LA) - friday (F) - saturday (SA) - festive (FE)
-
line
¶ int – Line number.
-
label
¶ string – Label of the line.
-
header_a
¶ string – Name of the end of the line A.
-
header_b
¶ string – Name of the end of the line B.
-
direction
¶ string – Direction of the line.
-
start_time
¶ string – Time in which the line starts service (HH:mm).
-
end_time
¶ string – Time in which the line ends service (HH:mm).
-
minimum_frequency
¶ int – minimum frequency of buses in minutes.
-
maximum_frequency
¶ int – maximum frequency of buses in minutes.
-
_json
¶ dict – Original API response.
-
-
class
pyemtmad.types.
ListLineInfo
(**kwargs)¶ Bases:
object
-
group
¶ int – Group number.
-
start_date
¶ string – Date in which line started service (DD/MM/YYYY).
-
end_date
¶ string – Date in which line ended service (DD/MM/YYYY).
-
line
¶ int – Line number.
-
label
¶ string – Label of the line.
-
header_a
¶ string – Name of the end of the line A.
-
header_b
¶ string – Name of the end of the line B.
-
_json
¶ dict – Original API response.
-
-
class
pyemtmad.types.
NodeLinesItem
(**kwargs)¶ Bases:
object
-
id
¶ int – Node ID.
-
name
¶ string – Node name.
-
lines
¶ list[tuple] – Line ID and direction.
-
latitude
¶ double – Latitude of the node in decimal degrees.
-
longitude
¶ double – Longitude of the node in decimal degrees.
-
_json
¶ dict – Original API response.
-
-
class
pyemtmad.types.
Parking
(**kwargs)¶ Bases:
object
-
id
¶ int – Parking ID. Parkings are identified with (family, id).
-
name
¶ str – Parking name.
-
address
¶ str – Parking address.
-
type
¶ str – Parking type.
-
administrative_area
¶ str – Administrative area in which the parking is located. This is usually ‘Madrid’.
-
area_code
¶ int – Postal code of the parking.
-
category
¶ str – Parking category code.
-
country
¶ str – Country in which the parking is located (‘Spain’).
-
family
¶ str – Family of the parking.
-
family_code
¶ str – Unique code of the family.
-
nickname
¶ str – Nickname of the parking.
-
state
¶ str – State in which the parking is located.
-
town
¶ str – Town in which the parking is located.
-
latitude
¶ double – Latitude of the parking in decimal degrees.
-
longitude
¶ double – Longitude of the parking in decimal degrees.
-
_json
¶ dict – Original API response.
-
-
class
pyemtmad.types.
ParkingAccess
(**kwargs)¶ Bases:
object
-
name
¶ str – Name of the access.
-
address
¶ str – Address where the access is located.
-
code
¶ str – ID code of the access.
-
url_icon
¶ str – URL to the icon representing the access.
-
latitude
¶ double – Latitude of the access in decimal degrees.
-
longitude
¶ double – Longitude of the access in decimal degrees.
-
_json
¶ dict – Original API response.
-
-
class
pyemtmad.types.
ParkingDetails
(**kwargs)¶ Bases:
object
-
id
¶ int – ID of the parking.
-
name
¶ str – Name of the parking.
-
schedule
¶ str – Time in which the parking is open.
-
address
¶ str – Parking address.
-
administrative_area
¶ str – Administrative area in which the parking is located. This is usually ‘Madrid’.
-
area_code
¶ str – Postal code of the parking.
-
category
¶ str – Name of the parking category.
-
category_code
¶ str – Parking category code.
-
type
¶ str – Parking type.
-
type_code
¶ str – Parking type code.
-
country
¶ str – Country in which the parking is located (‘Spain’).
-
url_icon
¶ str – URL to the icon representing this feature, if any.
-
nickname
¶ str – Nickname of the parking.
-
state
¶ str – State in which the parking is located.
-
town
¶ str – Town in which the parking is located.
-
latitude
¶ double – Latitude of the parking in decimal degrees.
-
longitude
¶ double – Longitude of the parking in decimal degrees.
-
accesses
¶ list[ParkingAccess] – List of accesses to this parking.
-
features
¶ list[ParkingFeature] – List of features of this parking.
-
occupation
¶ list[ParkingOccupation] – List of occupation details.
-
rates
¶ list[ParkingRate] – List of parking rates.
-
_json
¶ dict – Original API response.
-
-
class
pyemtmad.types.
ParkingFeature
(**kwargs)¶ Bases:
object
-
name
¶ str – Name of the feature.
-
code
¶ str – 3-char ID code of the feature.
-
content
¶ str – Content of the feature, if any.
-
description
¶ str – Description of the feature, if any.
-
field
¶ str – Localized name of the group the feature belongs to.
-
field_spanish
¶ str – Original name of the group the feature belongs to.
-
url_icon
¶ str – URL to the icon representing this feature, if any.
-
_json
¶ dict – Original API response.
-
-
class
pyemtmad.types.
ParkingOccupation
(**kwargs)¶ Bases:
object
-
type
¶ str – Type of slot.
-
code
¶ str – 3-char ID code of the feature.
-
free
¶ int – Number of free slots.
-
moment
¶ str – Moment in which the data was updated.
-
renewal_index
¶ double – Renewal index of the parking.
-
_json
¶ dict – Original API response.
-
-
class
pyemtmad.types.
ParkingPoi
(**kwargs)¶ Bases:
object
-
id
¶ int – Parking ID. Parkings are identified with (family, id).
-
name
¶ str – Parking name.
-
address
¶ str – Parking address.
-
address_number
¶ str – Street number of the POI (only for addresses).
-
type
¶ str – Element type. Possible types are: - zone - poi - parking
-
administrative_area
¶ str – Administrative area in which the parking is located. This is usually ‘Madrid’.
-
area_code
¶ int – Postal code of the parking.
-
category
¶ str – Parking category code.
-
country
¶ str – Country in which the parking is located (‘Spain’).
-
email
¶ str – Email of the POI (if any).
-
family
¶ str – Family of the parking.
-
family_code
¶ str – Unique code of the family.
-
fax
¶ str – Fax number of the POI (if any).
-
url_icon
¶ str – URL to the icon representing this POI, if any.
-
nickname
¶ str – Nickname of the parking.
-
state
¶ str – State in which the parking is located.
-
telephone
¶ str – Phone number.
-
town
¶ str – Town in which the parking is located.
-
latitude
¶ double – Latitude of the parking in decimal degrees.
-
longitude
¶ double – Longitude of the parking in decimal degrees.
-
_json
¶ dict – Original API response.
-
-
class
pyemtmad.types.
ParkingPoiType
(**kwargs)¶ Bases:
object
-
name
¶ str – Name of the POI type.
-
code
¶ str – Code of the POI type.
-
category
¶ str – Name of the POI category.
-
category_code
¶ str – Code of the POI category.
-
family
¶ str – Name of the POI family.
-
family_code
¶ str – Unique code of the family.
-
url_icon
¶ str – URL to the icon representing this POI, if any.
-
_json
¶ dict – Original API response.
-
-
class
pyemtmad.types.
ParkingRate
(**kwargs)¶ Bases:
object
-
description
¶ str – Rate description.
-
start_minutes
¶ int – Start minutes of the stay.
-
end_minutes
¶ int – End minutes of the stay.
-
type
¶ str – Type of rate (minutes, max, etc.)
-
rate
¶ double – Amount to pay given the rate type
-
schedule_start
¶ str – Starting time of the rate.
-
schedule_end
¶ str – End time of the rate.
-
_json
¶ dict – Original API response.
-
-
class
pyemtmad.types.
Poi
(**kwargs)¶ Bases:
object
-
id
¶ int – POI ID.
-
poi_type
¶ string – POI type.
-
name
¶ string – POI name.
-
address
¶ string – POI address.
-
street_number
¶ int – Street number of the POI.
-
phone_number
¶ string – Phone number of the POI (if any).
-
latitude
¶ double – latitude in decimal degrees.
-
longitude
¶ double – longitude in decimal degrees.
-
_json
¶ dict – Original API response.
-
-
class
pyemtmad.types.
PoiDetails
(**kwargs)¶ Bases:
object
-
id
¶ int – ID of the POI.
-
name
¶ str – Localized name of the POI.
-
name_spanish
¶ str – Original POI name.
-
description
¶ str – Description of the POI.
-
schedule
¶ str – Time in which the POI is open.
-
address
¶ str – Parking address.
-
administrative_area
¶ str – Administrative area in which the POI is located. This is usually ‘Madrid’.
-
area_code
¶ str – Postal code of the POI.
-
category
¶ str – Name of the POI category.
-
category_code
¶ str – POI category code.
-
type
¶ str – POI type.
-
type_code
¶ str – POI type code.
-
country
¶ str – Country in which the parking is located (‘Spain’).
-
email
¶ str – Email of the POI, if any.
-
telephone
¶ str – Public phone number of the POI, if any.
-
fax
¶ str – Public fax of the POI, if any.
-
url_icon
¶ str – URL to the icon representing this feature, if any.
-
state
¶ str – State in which the parking is located.
-
town
¶ str – Town in which the parking is located.
-
services_payment
¶ str – Payment services.
-
web
¶ str – Website of the POI, if any.
-
latitude
¶ double – Latitude of the parking in decimal degrees.
-
longitude
¶ double – Longitude of the parking in decimal degrees.
-
images
¶ list[PoiImage] – List of images attached to this POI.
-
_json
¶ dict – Original API response.
-
-
class
pyemtmad.types.
PoiImage
(**kwargs)¶ Bases:
object
-
description
¶ str – Description of the image, if any.
-
url
¶ str – URL to the image.
-
_json
¶ dict – Original API response.
-
-
class
pyemtmad.types.
PoiType
(**kwargs)¶ Bases:
object
-
id
¶ int – Type ID.
-
name
¶ string – Type name.
-
_json
¶ dict – Original API response.
-
-
class
pyemtmad.types.
RouteLinesItem
(**kwargs)¶ Bases:
object
-
id
¶ int – Node ID.
-
line
¶ int – Line to which the node belongs.
-
node_type
¶ string – Node type. May be: - forward_stop (10) - forward_vertex (19) - backward_stop (20) - backward_vertex (29)
-
distance_orig
¶ double – Distance to origin in meters.
-
distance_prev
¶ double – Distance to previous stop in meters.
-
name
¶ string – Name of the stop.
-
latitude
¶ double – Latitude in decimal degrees.
-
longitude
¶ double – Longitude in decimal degrees.
-
_json
¶ dict – Original API response.
-
-
class
pyemtmad.types.
Site
(**kwargs)¶ Bases:
object
-
id
¶ int – Site ID.
-
site_type
¶ string – Site type. May be: - street - poi
-
name
¶ string – Name of the site.
-
longitude
¶ double – longitude of the site in decimal degrees.
-
latitude
¶ double – latitude of the site in decimal degrees.
-
street_type
¶ string – Type of the street (avenue, street, etc.).
-
number_type
¶ string – Type of street numbering.
-
street_number
¶ int – Street number.
-
zip_code
¶ int – Street zip code.
-
poi_type
¶ string – Type of POI.
-
poi_address
¶ string – Address of the POI.
-
poi_street_number
¶ int – Street number of the POI.
-
poi_direction
¶ string – Direction of the POI.
-
poi_phone_number
¶ string – Phone number of the POI.
-
_json
¶ dict – Original API response.
-
-
class
pyemtmad.types.
Stop
(**kwargs)¶ Bases:
object
-
id
¶ int – Stop ID.
-
name
¶ string – Stop name.
-
address
¶ string – Postal address of the stop.
-
longitude
¶ double – Longitude of the stop in decimal degrees.
-
latitude
¶ double – Latitude of the stop in decimal degrees.
-
lines
¶ list[LineInfo] – Lines that stop here.
-
_json
¶ dict – Original API response.
-
-
class
pyemtmad.types.
Street
(**kwargs)¶ Bases:
object
-
name
¶ string – Name of the street.
-
street_type
¶ string – Type of street.
-
street_number
¶ int – Number of the street building.
-
latitude
¶ double – Latitude in decimal degrees.
-
longitude
¶ double – Longitude in decimal degrees.
-
_json
¶ dict – Original API response.
-
-
class
pyemtmad.types.
TimesLinesItem
(**kwargs)¶ Bases:
object
-
start_date
¶ string – Date in which line started service (DD/MM/YYYY).
-
end_date
¶ string – Date in which line ended service (DD/MM/YYYY).
-
line
¶ int – Line number.
-
day_type
¶ string – Day type. May be: - labour (LA) - friday (F) - saturday (SA) - festive (FE)
-
first_forward
¶ string – Date and time of first bus forward (A-B). (DD/MM/YYYY H:mm:ss)
-
first_backward
¶ string – Date and time of first bus backward (B-A). (DD/MM/YYYY H:mm:ss)
-
last_forward
¶ string – Date and time of last bus forward (A-B). (DD/MM/YYYY H:mm:ss)
-
last_backward
¶ string – Date and time of last bus backward (B-A). (DD/MM/YYYY H:mm:ss)
-
_json
¶ dict – Original API response.
-
-
class
pyemtmad.types.
TimetableLinesItem
(**kwargs)¶ Bases:
object
-
date
¶ string – Date for the timetable (DD/MM/YYYY).
-
day_type
¶ string – Day type. May be: - labour (LA) - friday (F) - saturday (SA) - festive (FE)
-
line
¶ int – Line number
-
direction
¶ string
-
trip
¶ int
-
start_time
¶ string – Starting time (HH:mm:ss).
-
end_time
¶ string – Ending time (HH:mm:ss).
-
_json
¶ dict – Original API response.
-