public class UraClient extends Object
| Modifier and Type | Class and Description |
|---|---|
class |
UraClient.Query
Request meta object.
|
| Constructor and Description |
|---|
UraClient(String baseURL)
Constructor with base URL and default API paths.
|
UraClient(String baseURL,
String instantURL,
String streamURL)
Constructor with base URL and custom API paths
|
| Modifier and Type | Method and Description |
|---|---|
UraClient.Query |
forDirection(Integer direction)
Builder pattern to request given direction.
|
UraClient.Query |
forLines(String... lines)
Builder pattern to request given line IDs.
|
UraClient.Query |
forLinesByName(String... lineNames)
Builder pattern to request given line names.
|
UraClient.Query |
forStops(String... stops)
Builder pattern to request given stop IDs.
|
UraClient.Query |
forStopsByName(String... stopNames)
Builder pattern to request given stop names.
|
List<Stop> |
getStops()
Get list of stops without filters.
|
List<Stop> |
getStops(UraClient.Query query)
List available stopIDs.
|
List<Trip> |
getTrips()
Get list of trips.
|
List<Trip> |
getTrips(Integer limit)
Get list of trips with limit.
|
List<Trip> |
getTrips(UraClient.Query query)
Get list of trips.
|
List<Trip> |
getTrips(UraClient.Query query,
Integer limit)
Get list of trips for given stopIDs and lineIDs with result limit.
|
public UraClient(String baseURL)
baseURL - the base URL (with protocol, without trailing slash)public UraClient.Query forStops(String... stops)
stops - Stop IDspublic UraClient.Query forStopsByName(String... stopNames)
stopNames - Stop Point Namespublic UraClient.Query forLines(String... lines)
lines - line IDspublic UraClient.Query forLinesByName(String... lineNames)
lineNames - line namespublic UraClient.Query forDirection(Integer direction)
direction - the direction IDpublic List<Trip> getTrips()
public List<Trip> getTrips(Integer limit)
limit - maximum number of resultspublic List<Trip> getTrips(UraClient.Query query)
query - the querypublic List<Trip> getTrips(UraClient.Query query, Integer limit)
query - the querylimit - maximum number of resultspublic List<Stop> getStops(UraClient.Query query)
query - the queryCopyright © 2016–2017. All rights reserved.