Protobuf messages for TravelTime API.
Use version 2.6.0
Proto files are located at: src/main/protobuf.
There's a separate .proto for every message type and additional .proto containing common types.
Every request message has a corresponding response message. E.g. HasData & HasDataResponse.
All request messages contain field Params.ApiKey that is used for authentication.
Check if we have data for given coordinates.
Given origin and destination points find out properties of connections between origin and destination points.
Find shapes of zones reachable from origin given travel time and transportation mode.
API is available using HTTP endpoint.
- serialize request Protobuf message to binary data.
- make HTTP POST request
- read response as binary data.
- deserialize corresponding response message from response binary data.
We support (and recommend to use) LZ4 compression.
It is available for most of the popular programming languages.
Get it at: https://code.google.com/p/lz4
To use it:
- compress request binary data
- add HTTP header Content-Encoding: lz4
- response data will also be compressed
Scripts are located at examples/python.
Examples are in Python 2.x.
To run the examples you must have Python libraries installed:
All mentioned dependencies can be installed using pip, i.e. pip install lz4.
compile .proto files into example/proto/target directory
There's a bash script compile_proto.sh.
run example scripts providing --app-id and --app-key arguments.
E.g. python2 has_data.py --app-id=1234 --app-key=abcd