Package fi.moprim.tmd.sdk.synthetic
Class SyntheticApi
- java.lang.Object
-
- fi.moprim.tmd.sdk.synthetic.SyntheticApi
-
public class SyntheticApi extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description SyntheticApi()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Result<Output>generateSyntheticData(android.content.Context context, Coordinates origin, Coordinates destination, Request requestType, java.lang.String apiKey)Generate synthetic data between the origin and destination, starting at the current time of the requeststatic voidgenerateSyntheticData(android.content.Context context, Coordinates origin, Coordinates destination, Request requestType, java.lang.String apiKey, Listener listener)Generate asynchronously synthetic data between the origin and destination, starting at the current time of the requeststatic Result<Output>generateSyntheticDataWithStart(android.content.Context context, Coordinates origin, Coordinates destination, Request requestType, java.lang.String apiKey, long startTimestamp)Generate synthetic data between the origin and destination, starting at the the time specified in the requeststatic voidgenerateSyntheticDataWithStart(android.content.Context context, Coordinates origin, Coordinates destination, Request requestType, java.lang.String apiKey, long startTimestamp, Listener listener)Generate asynchronously synthetic data between the origin and destination, starting at the the time specified in the requeststatic Result<Output>generateSyntheticDataWithStop(android.content.Context context, Coordinates origin, Coordinates destination, Request requestType, java.lang.String apiKey, long stopTimestamp)Generate synthetic data between the origin and destination, ending at the the time specified in the requeststatic voidgenerateSyntheticDataWithStop(android.content.Context context, Coordinates origin, Coordinates destination, Request requestType, java.lang.String apiKey, long stopTimestamp, Listener listener)Generate asynchronously synthetic data between the origin and destination, ending at the the time specified in the request
-
-
-
Method Detail
-
generateSyntheticData
@WorkerThread public static Result<Output> generateSyntheticData(@NonNull android.content.Context context, @NonNull Coordinates origin, @NonNull Coordinates destination, @NonNull Request requestType, @NonNull java.lang.String apiKey)
Generate synthetic data between the origin and destination, starting at the current time of the request- Parameters:
context- the contextorigin- the origin of the synthetic tripdestination- the destination of the synthetic triprequestType- the type of journeyapiKey- the external API key for the third-party journey planner- Returns:
- the output of the synthetic data generation
-
generateSyntheticData
@AnyThread public static void generateSyntheticData(@NonNull android.content.Context context, @NonNull Coordinates origin, @NonNull Coordinates destination, @NonNull Request requestType, @NonNull java.lang.String apiKey, Listener listener)Generate asynchronously synthetic data between the origin and destination, starting at the current time of the request- Parameters:
context- the contextorigin- the origin of the synthetic tripdestination- the destination of the synthetic triprequestType- the type of journeyapiKey- the external API key for the third-party journey plannerlistener- is triggered when the operation succeed or fails
-
generateSyntheticDataWithStart
@WorkerThread public static Result<Output> generateSyntheticDataWithStart(@NonNull android.content.Context context, @NonNull Coordinates origin, @NonNull Coordinates destination, @NonNull Request requestType, @NonNull java.lang.String apiKey, long startTimestamp)
Generate synthetic data between the origin and destination, starting at the the time specified in the request- Parameters:
context- the contextorigin- the origin of the synthetic tripdestination- the destination of the synthetic triprequestType- the type of journeyapiKey- the external API key for the third-party journey plannerstartTimestamp- the start timestamp (Epoch time in milliseconds)- Returns:
- the output of the synthetic data generation
-
generateSyntheticDataWithStart
@AnyThread public static void generateSyntheticDataWithStart(@NonNull android.content.Context context, @NonNull Coordinates origin, @NonNull Coordinates destination, @NonNull Request requestType, @NonNull java.lang.String apiKey, long startTimestamp, Listener listener)Generate asynchronously synthetic data between the origin and destination, starting at the the time specified in the request- Parameters:
context- the contextorigin- the origin of the synthetic tripdestination- the destination of the synthetic triprequestType- the type of journeyapiKey- the external API key for the third-party journey plannerstartTimestamp- the start timestamp (Epoch time in milliseconds)listener- is triggered when the operation succeed or fails
-
generateSyntheticDataWithStop
@WorkerThread public static Result<Output> generateSyntheticDataWithStop(@NonNull android.content.Context context, @NonNull Coordinates origin, @NonNull Coordinates destination, @NonNull Request requestType, @NonNull java.lang.String apiKey, long stopTimestamp)
Generate synthetic data between the origin and destination, ending at the the time specified in the request- Parameters:
context- the contextorigin- the origin of the synthetic tripdestination- the destination of the synthetic triprequestType- the type of journeyapiKey- the external API key for the third-party journey plannerstopTimestamp- the stop timestamp (Epoch time in milliseconds)- Returns:
- the output of the synthetic data generation
-
generateSyntheticDataWithStop
@AnyThread public static void generateSyntheticDataWithStop(@NonNull android.content.Context context, @NonNull Coordinates origin, @NonNull Coordinates destination, @NonNull Request requestType, @NonNull java.lang.String apiKey, long stopTimestamp, Listener listener)Generate asynchronously synthetic data between the origin and destination, ending at the the time specified in the request- Parameters:
context- the contextorigin- the origin of the synthetic tripdestination- the destination of the synthetic triprequestType- the type of journeyapiKey- the external API key for the third-party journey plannerstopTimestamp- the stop timestamp (Epoch time in milliseconds)listener- is triggered when the operation succeed or fails
-
-