Skip to content

Latest commit

 

History

History
836 lines (593 loc) · 20.5 KB

FaresApi.md

File metadata and controls

836 lines (593 loc) · 20.5 KB

FaresApi

All URIs are relative to https://api.openmove.com

Method HTTP request Description
ticketsAgenciesGet GET /tickets/agencies Returns agencies list
ticketsFaresAgencyIdTagGet GET /tickets/fares/{agencyId}/{tag} Returns fare tickets list DEPRECATED use GET 'tickets/fares'
ticketsFaresAttributesFareIdGet GET /tickets/fares/attributes/{fareId} Returns attributes of a given fare
ticketsFaresDelete DELETE /tickets/fares Delete a given fare
ticketsFaresGet GET /tickets/fares Returns fare tickets list
ticketsFaresLineZonePost POST /tickets/fares/line-zone Add new line/zone fare
ticketsFaresOriginDestinationPost POST /tickets/fares/origin-destination Add new origin/destination fare
ticketsFaresSearchPost POST /tickets/fares/search Returns fare tickets list
ticketsFaresUniqueAgencyIdTagGet GET /tickets/fares/unique/{agencyId}/{tag} Returns fare tickets list DEPRECATED use GET 'tickets/fares'
ticketsNotesAgencyIdGet GET /tickets/notes/{agencyId} Returns notes list
ticketsRoutesAgencyIdGet GET /tickets/routes/{agencyId} Returns routes list
ticketsRoutesSearchPost POST /tickets/routes/search Returns routes list
ticketsRoutesTypesNearbyPost POST /tickets/routes/types/nearby Returns route types list nearby a given position
ticketsStopStopIdGet GET /tickets/stop/{stopId} Returns tickets stop info
ticketsStopsAgencyIdGet GET /tickets/stops/{agencyId} Returns tickets stops list
ticketsStopsAgencyIdRouteTypeGet GET /tickets/stops/{agencyId}/{routeType} Returns stops list
ticketsStopsNearbyPost POST /tickets/stops/nearby Returns stops list nearby a given position
ticketsZonesAgencyIdGet GET /tickets/zones/{agencyId} Returns zones list
ticketsZonesFindByStopsPost POST /tickets/zones/findByStops Returns zones list
ticketsZonesNearbyPost POST /tickets/zones/nearby Returns zones list nearby a given position

ticketsAgenciesGet

ticketsAgenciesGet()

Returns agencies list

Example

// Import classes:
//import com.openmove.api.FaresApi;

FaresApi apiInstance = new FaresApi();
try {
    apiInstance.ticketsAgenciesGet();
} catch (ApiException e) {
    System.err.println("Exception when calling FaresApi#ticketsAgenciesGet");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

null (empty response body)

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

ticketsFaresAgencyIdTagGet

ticketsFaresAgencyIdTagGet(agencyId, tag)

Returns fare tickets list DEPRECATED use GET 'tickets/fares'

Example

// Import classes:
//import com.openmove.api.FaresApi;

FaresApi apiInstance = new FaresApi();
String agencyId = "agencyId_example"; // String | agency id
String tag = "tag_example"; // String | gtfs tag
try {
    apiInstance.ticketsFaresAgencyIdTagGet(agencyId, tag);
} catch (ApiException e) {
    System.err.println("Exception when calling FaresApi#ticketsFaresAgencyIdTagGet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
agencyId String agency id
tag String gtfs tag

Return type

null (empty response body)

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

ticketsFaresAttributesFareIdGet

ticketsFaresAttributesFareIdGet(fareId)

Returns attributes of a given fare

Example

// Import classes:
//import com.openmove.api.FaresApi;

FaresApi apiInstance = new FaresApi();
String fareId = "fareId_example"; // String | fare attribuites request
try {
    apiInstance.ticketsFaresAttributesFareIdGet(fareId);
} catch (ApiException e) {
    System.err.println("Exception when calling FaresApi#ticketsFaresAttributesFareIdGet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
fareId String fare attribuites request

Return type

null (empty response body)

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

ticketsFaresDelete

ticketsFaresDelete(fareId)

Delete a given fare

Example

// Import classes:
//import com.openmove.api.FaresApi;

FaresApi apiInstance = new FaresApi();
String fareId = "fareId_example"; // String | Fare id to delete
try {
    apiInstance.ticketsFaresDelete(fareId);
} catch (ApiException e) {
    System.err.println("Exception when calling FaresApi#ticketsFaresDelete");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
fareId String Fare id to delete

Return type

null (empty response body)

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

ticketsFaresGet

ticketsFaresGet(agencyId, tag, unique, userId)

Returns fare tickets list

Example

// Import classes:
//import com.openmove.api.FaresApi;

FaresApi apiInstance = new FaresApi();
String agencyId = "agencyId_example"; // String | agency id
String tag = "tag_example"; // String | gtfs tag
Boolean unique = true; // Boolean | get unique results
String userId = "userId_example"; // String | user id
try {
    apiInstance.ticketsFaresGet(agencyId, tag, unique, userId);
} catch (ApiException e) {
    System.err.println("Exception when calling FaresApi#ticketsFaresGet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
agencyId String agency id
tag String gtfs tag [optional]
unique Boolean get unique results [optional]
userId String user id [optional]

Return type

null (empty response body)

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

ticketsFaresLineZonePost

ticketsFaresLineZonePost(body)

Add new line/zone fare

Example

// Import classes:
//import com.openmove.api.FaresApi;

FaresApi apiInstance = new FaresApi();
CreateLineZoneTicketRequest body = new CreateLineZoneTicketRequest(); // CreateLineZoneTicketRequest | line/zone fare creation
try {
    apiInstance.ticketsFaresLineZonePost(body);
} catch (ApiException e) {
    System.err.println("Exception when calling FaresApi#ticketsFaresLineZonePost");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body CreateLineZoneTicketRequest line/zone fare creation

Return type

null (empty response body)

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

ticketsFaresOriginDestinationPost

ticketsFaresOriginDestinationPost(body)

Add new origin/destination fare

Example

// Import classes:
//import com.openmove.api.FaresApi;

FaresApi apiInstance = new FaresApi();
CreateOriginDestinationTicketRequest body = new CreateOriginDestinationTicketRequest(); // CreateOriginDestinationTicketRequest | line/zone fare creation
try {
    apiInstance.ticketsFaresOriginDestinationPost(body);
} catch (ApiException e) {
    System.err.println("Exception when calling FaresApi#ticketsFaresOriginDestinationPost");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body CreateOriginDestinationTicketRequest line/zone fare creation

Return type

null (empty response body)

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

ticketsFaresSearchPost

ticketsFaresSearchPost(body)

Returns fare tickets list

Example

// Import classes:
//import com.openmove.api.FaresApi;

FaresApi apiInstance = new FaresApi();
FareRequest body = new FareRequest(); // FareRequest | fare request
try {
    apiInstance.ticketsFaresSearchPost(body);
} catch (ApiException e) {
    System.err.println("Exception when calling FaresApi#ticketsFaresSearchPost");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body FareRequest fare request

Return type

null (empty response body)

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

ticketsFaresUniqueAgencyIdTagGet

ticketsFaresUniqueAgencyIdTagGet(agencyId, tag)

Returns fare tickets list DEPRECATED use GET 'tickets/fares'

Example

// Import classes:
//import com.openmove.api.FaresApi;

FaresApi apiInstance = new FaresApi();
String agencyId = "agencyId_example"; // String | agency id
String tag = "tag_example"; // String | gtfs tag
try {
    apiInstance.ticketsFaresUniqueAgencyIdTagGet(agencyId, tag);
} catch (ApiException e) {
    System.err.println("Exception when calling FaresApi#ticketsFaresUniqueAgencyIdTagGet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
agencyId String agency id
tag String gtfs tag

Return type

null (empty response body)

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

ticketsNotesAgencyIdGet

ticketsNotesAgencyIdGet(agencyId)

Returns notes list

Example

// Import classes:
//import com.openmove.api.FaresApi;

FaresApi apiInstance = new FaresApi();
String agencyId = "agencyId_example"; // String | agency id
try {
    apiInstance.ticketsNotesAgencyIdGet(agencyId);
} catch (ApiException e) {
    System.err.println("Exception when calling FaresApi#ticketsNotesAgencyIdGet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
agencyId String agency id

Return type

null (empty response body)

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

ticketsRoutesAgencyIdGet

ticketsRoutesAgencyIdGet(agencyId)

Returns routes list

Example

// Import classes:
//import com.openmove.api.FaresApi;

FaresApi apiInstance = new FaresApi();
String agencyId = "agencyId_example"; // String | agency id
try {
    apiInstance.ticketsRoutesAgencyIdGet(agencyId);
} catch (ApiException e) {
    System.err.println("Exception when calling FaresApi#ticketsRoutesAgencyIdGet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
agencyId String agency id

Return type

null (empty response body)

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

ticketsRoutesSearchPost

ticketsRoutesSearchPost(body)

Returns routes list

Example

// Import classes:
//import com.openmove.api.FaresApi;

FaresApi apiInstance = new FaresApi();
RouteRequest body = new RouteRequest(); // RouteRequest | route request
try {
    apiInstance.ticketsRoutesSearchPost(body);
} catch (ApiException e) {
    System.err.println("Exception when calling FaresApi#ticketsRoutesSearchPost");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body RouteRequest route request

Return type

null (empty response body)

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

ticketsRoutesTypesNearbyPost

ticketsRoutesTypesNearbyPost(body)

Returns route types list nearby a given position

Example

// Import classes:
//import com.openmove.api.FaresApi;

FaresApi apiInstance = new FaresApi();
Body4 body = new Body4(); // Body4 | route request
try {
    apiInstance.ticketsRoutesTypesNearbyPost(body);
} catch (ApiException e) {
    System.err.println("Exception when calling FaresApi#ticketsRoutesTypesNearbyPost");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body Body4 route request

Return type

null (empty response body)

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

ticketsStopStopIdGet

ticketsStopStopIdGet(stopId)

Returns tickets stop info

Example

// Import classes:
//import com.openmove.api.FaresApi;

FaresApi apiInstance = new FaresApi();
String stopId = "stopId_example"; // String | stop id
try {
    apiInstance.ticketsStopStopIdGet(stopId);
} catch (ApiException e) {
    System.err.println("Exception when calling FaresApi#ticketsStopStopIdGet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
stopId String stop id

Return type

null (empty response body)

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

ticketsStopsAgencyIdGet

ticketsStopsAgencyIdGet(agencyId)

Returns tickets stops list

Example

// Import classes:
//import com.openmove.api.FaresApi;

FaresApi apiInstance = new FaresApi();
String agencyId = "agencyId_example"; // String | agency id
try {
    apiInstance.ticketsStopsAgencyIdGet(agencyId);
} catch (ApiException e) {
    System.err.println("Exception when calling FaresApi#ticketsStopsAgencyIdGet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
agencyId String agency id

Return type

null (empty response body)

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

ticketsStopsAgencyIdRouteTypeGet

ticketsStopsAgencyIdRouteTypeGet(agencyId, routeType)

Returns stops list

Example

// Import classes:
//import com.openmove.api.FaresApi;

FaresApi apiInstance = new FaresApi();
String agencyId = "agencyId_example"; // String | agency id
String routeType = "routeType_example"; // String | stops request by route types
try {
    apiInstance.ticketsStopsAgencyIdRouteTypeGet(agencyId, routeType);
} catch (ApiException e) {
    System.err.println("Exception when calling FaresApi#ticketsStopsAgencyIdRouteTypeGet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
agencyId String agency id
routeType String stops request by route types

Return type

null (empty response body)

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

ticketsStopsNearbyPost

ticketsStopsNearbyPost(body)

Returns stops list nearby a given position

Example

// Import classes:
//import com.openmove.api.FaresApi;

FaresApi apiInstance = new FaresApi();
Body3 body = new Body3(); // Body3 | stop request
try {
    apiInstance.ticketsStopsNearbyPost(body);
} catch (ApiException e) {
    System.err.println("Exception when calling FaresApi#ticketsStopsNearbyPost");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body Body3 stop request

Return type

null (empty response body)

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

ticketsZonesAgencyIdGet

ticketsZonesAgencyIdGet(agencyId)

Returns zones list

Example

// Import classes:
//import com.openmove.api.FaresApi;

FaresApi apiInstance = new FaresApi();
String agencyId = "agencyId_example"; // String | agency id
try {
    apiInstance.ticketsZonesAgencyIdGet(agencyId);
} catch (ApiException e) {
    System.err.println("Exception when calling FaresApi#ticketsZonesAgencyIdGet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
agencyId String agency id

Return type

null (empty response body)

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

ticketsZonesFindByStopsPost

ticketsZonesFindByStopsPost(body)

Returns zones list

Example

// Import classes:
//import com.openmove.api.FaresApi;

FaresApi apiInstance = new FaresApi();
Body5 body = new Body5(); // Body5 | zones request by stops
try {
    apiInstance.ticketsZonesFindByStopsPost(body);
} catch (ApiException e) {
    System.err.println("Exception when calling FaresApi#ticketsZonesFindByStopsPost");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body Body5 zones request by stops

Return type

null (empty response body)

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

ticketsZonesNearbyPost

ticketsZonesNearbyPost(body)

Returns zones list nearby a given position

Example

// Import classes:
//import com.openmove.api.FaresApi;

FaresApi apiInstance = new FaresApi();
Body6 body = new Body6(); // Body6 | zone request
try {
    apiInstance.ticketsZonesNearbyPost(body);
} catch (ApiException e) {
    System.err.println("Exception when calling FaresApi#ticketsZonesNearbyPost");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body Body6 zone request

Return type

null (empty response body)

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined