This is the Java example code FlixMobility provides for the Public API. Please refer to the online documentation we provide on our Developer Portal.
- Java 11
- Maven
- Replace the values of INTEGRATION_EMAIL, INTEGRATION_PASSWORD and INTEGRATION_TOKEN in /src/main/java/com.flixbus.api.util.ExampleCodeHelper with your credentials.
- Run the main method in /src/main/java/com.flixbus.api.SearchExample.
The examples reflect use cases like Search and Booking which includes necessary steps like authentication or getting passenger details. So if you are specifically looking for an example on how to accomplish authentication for instance you can find this in the code of those examples.
We provide the example code in order to reduce your effort during the implementation of your client. You might want to consider to use the classes in package com.flixbus.api.domain as is since the deserialization from api responses works out of the box (using the Jackson library).
However we do not make any warranties about the completeness of the code. You will need to implement your client due to your business requirements.