bahn_ex v1.0.0 BahnEx.Location View Source
Wrapper around the location endpoint of the DB Fahrplan API
Link to this section Summary
Functions
Get information about locations matching the given name or name fragment name_or_fragment
Link to this section Types
Link to this type
t()
View Source
t() :: %BahnEx.Location{id: non_neg_integer, lat: float, lon: float, name: String.t}
Link to this section Functions
Link to this function
get_location(name_or_fragment)
View Source
get_location(String.t) :: [BahnEx.Location.t] | nil
Get information about locations matching the given name or name fragment name_or_fragment
Returns a list of %BahnEx.Location{}
Examples
iex>BahnEx.Location.get_location(“Dresden”) [%BahnEx.Location{id: 8010085, lat: 51.040562, lon: 13.732039, name: “Dresden Hbf”}, %BahnEx.Location{id: 8010089, lat: 51.065903, lon: 13.740704, name: “Dresden-Neustadt”}]