| Commit message (Collapse) | Author | Age |
| |
|
| |
|
|
|
|
|
| |
Retrieves the next departures of a given station. The time handling
needs to be checked, as the DB API always uses Europe/Berlin.
|
|
|
|
|
| |
dbfp_location_close releases the resources allocated by a dbfp_location
structure. It does not free the structure itself.
|
|
|
|
|
|
| |
In dbfp_query_location_name, URL-encode the input string using curl
before sending the HTTP request. This fixes the issue that input
strings with non-URL characters leed to empty results.
|
|
|
|
|
| |
As the curl handle can be reused between requests, it is moved to the
dbfp structure, initialized in dbfp_init and freed in dbfp_close.
|
|
|
|
|
|
| |
The location.name query (dbfp_query_location_name) also returns the
coordinates of the location. This commit adds them to the dbfp_location
structure and to the query itself.
|
|
|
|
|
|
|
|
| |
Get rid of the complicated dbfp_status structure and use plain old
return codes. This leads to a cleaner interface and fixes the problem
with unsufficient error handling introduced with 1648e81. The drawback
is that the details of curl and expat errors are hidden from the user,
but this can be adressed later.
|
|
|
|
|
|
|
|
|
|
|
| |
The function dbfp_query_location_name performs the location.name query
and returns a list of all stations that match the search term. The
implementation has two flaws: there is no URL encoding, and
malformatted query results will not lead to a meaningful error message.
There are two new test cases: basic tests some basic functionality, as
setting the API key and accessing the API. location adds a simple test
for the location.name query.
|
|
|