A Java client for JC Decaux's Open Data APIs
This project is a simple client library for JC Decaux Open Data. In order to use this API, you need to get a key at http://developer.jcdecaux.com.
JCD Open Data Client is available in my maven repository (I'll apply for Maven Central deployment).
<dependency>
<groupId>com.jcdecaux.opendat</groupId>
<artifactId>opendata-client</artifactId>
<version>1.1.0-SNAPSHOT</version>
</dependency>
Note: The client is thread-safe.
// ...
import static com.jcdecaux.opendata.client.vls.v1.VLSClient.vlsClient;
public class MyClass {
private static final String apiKey = "xxxxx";
public void myMethod() {
// Get all stations
List<StationDTO> all = vlsClient.getStations(apiKey, null);
// Get all contracts
List<ContractDTO> c = vlsClient.getContracts(apiKey);
// Get all stations for one contract (Paris)
List<StationDTO> p = vlsClient.getStations(apiKey, "Paris");
// Get one station of Paris
StationDTO s = vlsClient.getStation(apiKey, "Paris", "35010");
}
}
We will update this client according to updates to our Opendata API
This software is licenced under the Apache Software License v2.0, you can find it in the LICENCE file.