# TransportForNswApi.DefaultApi

All URIs are relative to *https://api.transport.nsw.gov.au/v1/tp*

Method | HTTP request | Description
------------- | ------------- | -------------
[**tfnswAddinfoRequest**](DefaultApi.md#tfnswAddinfoRequest) | **GET** /add_info | Provides capability to display all public transport service status and incident information (as published from the Incident Capture System).
[**tfnswCoordRequest**](DefaultApi.md#tfnswCoordRequest) | **GET** /coord | When given a specific geographical location, this API finds public transport stops, stations, wharfs and points of interest around that location.
[**tfnswDmRequest**](DefaultApi.md#tfnswDmRequest) | **GET** /departure_mon | Provides capability to provide NSW public transport departure information from a stop, station or wharf including real-time.
[**tfnswStopfinderRequest**](DefaultApi.md#tfnswStopfinderRequest) | **GET** /stop_finder | Provides capability to return all NSW public transport stop, station, wharf, points of interest and known addresses to be used for auto-suggest/auto-complete (to be used with the Trip planner and Departure board APIs).
[**tfnswTripRequest2**](DefaultApi.md#tfnswTripRequest2) | **GET** /trip | Provides capability to provide NSW public transport trip plan options, including walking and driving legs, real-time and Opal fare information.


<a name="tfnswAddinfoRequest"></a>
# **tfnswAddinfoRequest**
> AdditionalInfoResponse tfnswAddinfoRequest(outputFormat, opts)

Provides capability to display all public transport service status and incident information (as published from the Incident Capture System).

This endpoint returns a list of service alerts or additional information about travelling on the public transport network. This list can be filtered by date, route type, route, operator or stop. 

### Example
```javascript
var TransportForNswApi = require('transport_for_nsw_api');
var defaultClient = TransportForNswApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: tfnsw_auth
var tfnsw_auth = defaultClient.authentications['tfnsw_auth'];
tfnsw_auth.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new TransportForNswApi.DefaultApi();

var outputFormat = "outputFormat_example"; // String | Used to set the response data type. This documentation only covers responses that use the JSON format. Setting the `outputFormat` value to `rapidJSON` is required to enable JSON output. 

var opts = { 
  'filterDateValid': "01-10-2016", // String | This parameter allows you to filter the returned items that are only valid on the specified date. The format of this field is `DD-MM-YYYY`. For example, 12 September 2016 would be represented by `12-09-2016`. 
  'filterMOTType': 56, // Number | This parameter allows you to filter the returned items by the modes of transport they affected. Available modes include:  * `1`: Train * `4`: Light Rail * `5`: Bus * `7`: Coach * `9`: Ferry * `11`: School Bus  To search for more than one mode, include the parameter multiple times. 
  'filterPublicationStatus': "filterPublicationStatus_example", // String | This field can be used so only current alerts are returned, and not historic alerts. 
  'itdLPxxSelStop': "itdLPxxSelStop_example", // String | This parameter allows you to filter the returned items by its stop ID. For example, to retrieve items that are only relevant to Central Station, you would set this value to `10111010`. You can use the `stop_finder` API call to determine the ID for a particular stop. 
  'itdLPxxSelLine': "itdLPxxSelLine_example", // String | This parameter allows you to filter the returned items by line number. For example, `020T1`. You can use this parameter multiple times if you want to search for more than one line number. 
  'itdLPxxSelOperator': "itdLPxxSelOperator_example", // String | This parameter allows you to filter the returned items by operator ID. You can use this parameter multiple times if you want to search for more than one line number. 
  'filterPNLineDir': "filterPNLineDir_example", // String | This parameter allows you to filter the returned items by specific routes. The route is provided in the format `NNN:LLLLL:D`, (NNN: subnet, LLLLL: Route number, D: direction `H`/`R`). You can use this parameter multiple times if you want to search for more than one line number. 
  'filterPNLineSub': "filterPNLineSub_example", // String | This parameter allows you to filter the returned items by specific routes. The route is provided in the format `NNN:LLLLL:E`, (NNN: subnet, LLLLL: Route number, E: supplement). You can use this parameter multiple times if you want to search for more than one line number. 
  'version': "10.2.1.42" // String | Indicates which version of the API the caller is expecting for both request and response data. Note that if this version differs from the version listed above then the returned data may not be as expected. 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.tfnswAddinfoRequest(outputFormat, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **outputFormat** | **String**| Used to set the response data type. This documentation only covers responses that use the JSON format. Setting the &#x60;outputFormat&#x60; value to &#x60;rapidJSON&#x60; is required to enable JSON output.  | 
 **filterDateValid** | **String**| This parameter allows you to filter the returned items that are only valid on the specified date. The format of this field is &#x60;DD-MM-YYYY&#x60;. For example, 12 September 2016 would be represented by &#x60;12-09-2016&#x60;.  | [optional] [default to 01-10-2016]
 **filterMOTType** | **Number**| This parameter allows you to filter the returned items by the modes of transport they affected. Available modes include:  * &#x60;1&#x60;: Train * &#x60;4&#x60;: Light Rail * &#x60;5&#x60;: Bus * &#x60;7&#x60;: Coach * &#x60;9&#x60;: Ferry * &#x60;11&#x60;: School Bus  To search for more than one mode, include the parameter multiple times.  | [optional] 
 **filterPublicationStatus** | **String**| This field can be used so only current alerts are returned, and not historic alerts.  | [optional] 
 **itdLPxxSelStop** | **String**| This parameter allows you to filter the returned items by its stop ID. For example, to retrieve items that are only relevant to Central Station, you would set this value to &#x60;10111010&#x60;. You can use the &#x60;stop_finder&#x60; API call to determine the ID for a particular stop.  | [optional] 
 **itdLPxxSelLine** | **String**| This parameter allows you to filter the returned items by line number. For example, &#x60;020T1&#x60;. You can use this parameter multiple times if you want to search for more than one line number.  | [optional] 
 **itdLPxxSelOperator** | **String**| This parameter allows you to filter the returned items by operator ID. You can use this parameter multiple times if you want to search for more than one line number.  | [optional] 
 **filterPNLineDir** | **String**| This parameter allows you to filter the returned items by specific routes. The route is provided in the format &#x60;NNN:LLLLL:D&#x60;, (NNN: subnet, LLLLL: Route number, D: direction &#x60;H&#x60;/&#x60;R&#x60;). You can use this parameter multiple times if you want to search for more than one line number.  | [optional] 
 **filterPNLineSub** | **String**| This parameter allows you to filter the returned items by specific routes. The route is provided in the format &#x60;NNN:LLLLL:E&#x60;, (NNN: subnet, LLLLL: Route number, E: supplement). You can use this parameter multiple times if you want to search for more than one line number.  | [optional] 
 **version** | **String**| Indicates which version of the API the caller is expecting for both request and response data. Note that if this version differs from the version listed above then the returned data may not be as expected.  | [optional] [default to 10.2.1.42]

### Return type

[**AdditionalInfoResponse**](AdditionalInfoResponse.md)

### Authorization

[tfnsw_auth](../README.md#tfnsw_auth)

### HTTP request headers

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

<a name="tfnswCoordRequest"></a>
# **tfnswCoordRequest**
> CoordRequestResponse tfnswCoordRequest(outputFormat, coord, coordOutputFormat, inclFilter, type1, radius1, opts)

When given a specific geographical location, this API finds public transport stops, stations, wharfs and points of interest around that location.

This endpoint returns places of interest based on the given coordinate and a radius. The types of POIs can be controlled, so if, for example, you only want Opal resellers returned, you can do so. 

### Example
```javascript
var TransportForNswApi = require('transport_for_nsw_api');
var defaultClient = TransportForNswApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: tfnsw_auth
var tfnsw_auth = defaultClient.authentications['tfnsw_auth'];
tfnsw_auth.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new TransportForNswApi.DefaultApi();

var outputFormat = "outputFormat_example"; // String | Used to set the response data type. This documentation only covers responses that use the JSON format. Setting the `outputFormat` value to `rapidJSON` is required to enable JSON output. 

var coord = "151.206290:-33.884080:EPSG:4326"; // String | The coordinate is in the format `LONGITUDE:LATITUDE:EPSG:4326` (Note that longitude is first). For example, the following `coord` value can be used to search around Central Station: `151.206290:-33.884080:EPSG:4326`. 

var coordOutputFormat = "coordOutputFormat_example"; // String | This specifies the format the coordinates are returned in. While other variations are available, the `EPSG:4326` format will return the widely-used format. 

var inclFilter = 1; // Number | This enables \"advanced filter mode\" on the server, which is required to enable searching using coordinates. 

var type1 = "GIS_POINT"; // String | This specifies the type of items to return.  * `GIS_POINT`: GIS points, including Opal resellers (see `inclDrawClasses_1`) * `BUS_POINT`: Stops/stations * `POI_POINT`: Places of interest  The `_1` suffix is an index for this particular filter. You can specify multiple filters by incrementing the suffix for each combination of `type`, `radius` and `inclDrawClasses`. For example, `type_1` means the first filter, `type_2` refers to the second, and so on. 

var radius1 = 1000; // Number | This indicates the maximum number of metres to search in all directions from the location specified in `coord`. For example, if you use a value of `500`, a `type_1` value of `GIS_POINT` and `inclDrawClasses_1` with a value of `74`, all Opal resellers within 500 metres will be returned. The suffix of `_1` indicates this radius value corresponds to the `type_1` value. If multiple filters are to be included, the appropriate suffix should be updated accordingly. 

var opts = { 
  'inclDrawClasses1': 56, // Number | This flag changes the list of POIs that are returned. To return Opal resellers, set this value to `74` and `type_1` to `GIS_POINT`.The suffix of `_1` indicates this radius value corresponds to the `type_1` value. If multiple filters are to be included, the appropriate suffix should be updated accordingly. 
  'poisOnMapMacro': "true", // String | This field indicates how the returned data is to be used, which in turn impacts whether or not certain locations are returned. 
  'version': "10.2.1.42" // String | Indicates which version of the API the caller is expecting for both request and response data. Note that if this version differs from the version listed above then the returned data may not be as expected. 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.tfnswCoordRequest(outputFormat, coord, coordOutputFormat, inclFilter, type1, radius1, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **outputFormat** | **String**| Used to set the response data type. This documentation only covers responses that use the JSON format. Setting the &#x60;outputFormat&#x60; value to &#x60;rapidJSON&#x60; is required to enable JSON output.  | 
 **coord** | **String**| The coordinate is in the format &#x60;LONGITUDE:LATITUDE:EPSG:4326&#x60; (Note that longitude is first). For example, the following &#x60;coord&#x60; value can be used to search around Central Station: &#x60;151.206290:-33.884080:EPSG:4326&#x60;.  | [default to 151.206290:-33.884080:EPSG:4326]
 **coordOutputFormat** | **String**| This specifies the format the coordinates are returned in. While other variations are available, the &#x60;EPSG:4326&#x60; format will return the widely-used format.  | 
 **inclFilter** | **Number**| This enables \&quot;advanced filter mode\&quot; on the server, which is required to enable searching using coordinates.  | [default to 1]
 **type1** | **String**| This specifies the type of items to return.  * &#x60;GIS_POINT&#x60;: GIS points, including Opal resellers (see &#x60;inclDrawClasses_1&#x60;) * &#x60;BUS_POINT&#x60;: Stops/stations * &#x60;POI_POINT&#x60;: Places of interest  The &#x60;_1&#x60; suffix is an index for this particular filter. You can specify multiple filters by incrementing the suffix for each combination of &#x60;type&#x60;, &#x60;radius&#x60; and &#x60;inclDrawClasses&#x60;. For example, &#x60;type_1&#x60; means the first filter, &#x60;type_2&#x60; refers to the second, and so on.  | [default to GIS_POINT]
 **radius1** | **Number**| This indicates the maximum number of metres to search in all directions from the location specified in &#x60;coord&#x60;. For example, if you use a value of &#x60;500&#x60;, a &#x60;type_1&#x60; value of &#x60;GIS_POINT&#x60; and &#x60;inclDrawClasses_1&#x60; with a value of &#x60;74&#x60;, all Opal resellers within 500 metres will be returned. The suffix of &#x60;_1&#x60; indicates this radius value corresponds to the &#x60;type_1&#x60; value. If multiple filters are to be included, the appropriate suffix should be updated accordingly.  | [default to 1000]
 **inclDrawClasses1** | **Number**| This flag changes the list of POIs that are returned. To return Opal resellers, set this value to &#x60;74&#x60; and &#x60;type_1&#x60; to &#x60;GIS_POINT&#x60;.The suffix of &#x60;_1&#x60; indicates this radius value corresponds to the &#x60;type_1&#x60; value. If multiple filters are to be included, the appropriate suffix should be updated accordingly.  | [optional] 
 **poisOnMapMacro** | **String**| This field indicates how the returned data is to be used, which in turn impacts whether or not certain locations are returned.  | [optional] [default to true]
 **version** | **String**| Indicates which version of the API the caller is expecting for both request and response data. Note that if this version differs from the version listed above then the returned data may not be as expected.  | [optional] [default to 10.2.1.42]

### Return type

[**CoordRequestResponse**](CoordRequestResponse.md)

### Authorization

[tfnsw_auth](../README.md#tfnsw_auth)

### HTTP request headers

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

<a name="tfnswDmRequest"></a>
# **tfnswDmRequest**
> DepartureMonitorResponse tfnswDmRequest(outputFormat, coordOutputFormat, typeDm, nameDm, opts)

Provides capability to provide NSW public transport departure information from a stop, station or wharf including real-time.

This endpoint returns a list of departures for a given location based on the date and time specified. This data can be used to display a \&quot;upcoming departures\&quot; board for a stop. 

### Example
```javascript
var TransportForNswApi = require('transport_for_nsw_api');
var defaultClient = TransportForNswApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: tfnsw_auth
var tfnsw_auth = defaultClient.authentications['tfnsw_auth'];
tfnsw_auth.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new TransportForNswApi.DefaultApi();

var outputFormat = "outputFormat_example"; // String | Used to set the response data type. This documentation only covers responses that use the JSON format. Setting the `outputFormat` value to `rapidJSON` is required to enable JSON output. 

var coordOutputFormat = "coordOutputFormat_example"; // String | This specifies the format the coordinates are returned in. While other variations are available, the `EPSG:4326` format will return the widely-used format.

var typeDm = "stop"; // String | This specifies the type of results expected based on the search input in `name_dm`. By specifying `any`, locations of all types can be returned. Typically, this API call is used for a specific stop, so `stop` should be used along with a stop ID in `name_dm`. 

var nameDm = "10111010"; // String | This is the search term that will be used to find locations. If the combination of this value and `type_dm` results in more than one location found - or `mode` is not set to `direct`, then a list of stops and no departures will be returned. 

var opts = { 
  'mode': "direct", // String | This allows the departure board to display directly without going through the stop verification process. Use this when the stop is known. This relies on the given combination of `type_dm` and `name_dm` returning only a single result, otherwise a list of stops and no departures shall be returned. 
  'nameKeyDm': "nameKeyDm_example", // String | Setting this parameter to `$USEPOINT$` enables you to request departures for a specific platform within a station. If this isn't used, then departures for all platforms at the stop specified in `name_dm` are returned. 
  'itdDate': "20161001", // String | The reference date used when searching trips, in `YYYYMMDD` format. For instance, 20160901 refers to 1 September 2016. Works in conjunction with the `itdTime` value. If not specified, the current server date is used. 
  'itdTime': "1200", // String | The reference time used when searching trips, in `HHMM` 24-hour format. For instance, 2215 refers to 10:15 PM. | Works in conjunction with the `itdDate` value. If not specified, the current server time is used. 
  'departureMonitorMacro': "true", // String | Including this parameter enables a number of options that result in the departure monitor operating in the same way as the Transport for NSW Trip Planner web site. It is recommended this is enabled, along with the `TfNSWDM` parameter. 
  'excludedMeans': "excludedMeans_example", // String | This parameter which means of transport to exclude from the departure monitor. To exclude one means, select one of the following: `1` = train, `4` = light rail, `5` = bus, `7` = coach, `9` = ferry, `11` = school bus. `checkbox` allows you to exclude more than one means of transport when used in conjunction with the `exclMOT_<ID>` parameters. 
  'exclMOT1': "exclMOT1_example", // String | Excludes train services from the departure monitor.  Must be used in conjunction with `excludedMeans=checkbox` 
  'exclMOT4': "exclMOT4_example", // String | Excludes light rail services from the departure monitor.  Must be used in conjunction with `excludedMeans=checkbox` 
  'exclMOT5': "exclMOT5_example", // String | Excludes bus services from the departure monitor.  Must be used in conjunction with `excludedMeans=checkbox` 
  'exclMOT7': "exclMOT7_example", // String | Excludes coach services from the departure monitor.  Must be used in conjunction with `excludedMeans=checkbox` 
  'exclMOT9': "exclMOT9_example", // String | Excludes ferry services from the departure monitor.  Must be used in conjunction with `excludedMeans=checkbox` 
  'exclMOT11': "exclMOT11_example", // String | Excludes school bus services from the departure monitor.  Must be used in conjunction with `excludedMeans=checkbox` 
  'tfNSWDM': "true", // String | Including this parameter enables a number of options that result in the departure monitor operating in the same way as the Transport for NSW Trip Planner web site, including enabling real-time data. It is recommended this is enabled, along with the `departureMonitorMacro` parameter. 
  'version': "10.2.1.42" // String | Indicates which version of the API the caller is expecting for both request and response data. Note that if this version differs from the version listed above then the returned data may not be as expected. 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.tfnswDmRequest(outputFormat, coordOutputFormat, typeDm, nameDm, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **outputFormat** | **String**| Used to set the response data type. This documentation only covers responses that use the JSON format. Setting the &#x60;outputFormat&#x60; value to &#x60;rapidJSON&#x60; is required to enable JSON output.  | 
 **coordOutputFormat** | **String**| This specifies the format the coordinates are returned in. While other variations are available, the &#x60;EPSG:4326&#x60; format will return the widely-used format. | 
 **typeDm** | **String**| This specifies the type of results expected based on the search input in &#x60;name_dm&#x60;. By specifying &#x60;any&#x60;, locations of all types can be returned. Typically, this API call is used for a specific stop, so &#x60;stop&#x60; should be used along with a stop ID in &#x60;name_dm&#x60;.  | [default to stop]
 **nameDm** | **String**| This is the search term that will be used to find locations. If the combination of this value and &#x60;type_dm&#x60; results in more than one location found - or &#x60;mode&#x60; is not set to &#x60;direct&#x60;, then a list of stops and no departures will be returned.  | [default to 10111010]
 **mode** | **String**| This allows the departure board to display directly without going through the stop verification process. Use this when the stop is known. This relies on the given combination of &#x60;type_dm&#x60; and &#x60;name_dm&#x60; returning only a single result, otherwise a list of stops and no departures shall be returned.  | [optional] [default to direct]
 **nameKeyDm** | **String**| Setting this parameter to &#x60;$USEPOINT$&#x60; enables you to request departures for a specific platform within a station. If this isn&#39;t used, then departures for all platforms at the stop specified in &#x60;name_dm&#x60; are returned.  | [optional] 
 **itdDate** | **String**| The reference date used when searching trips, in &#x60;YYYYMMDD&#x60; format. For instance, 20160901 refers to 1 September 2016. Works in conjunction with the &#x60;itdTime&#x60; value. If not specified, the current server date is used.  | [optional] [default to 20161001]
 **itdTime** | **String**| The reference time used when searching trips, in &#x60;HHMM&#x60; 24-hour format. For instance, 2215 refers to 10:15 PM. | Works in conjunction with the &#x60;itdDate&#x60; value. If not specified, the current server time is used.  | [optional] [default to 1200]
 **departureMonitorMacro** | **String**| Including this parameter enables a number of options that result in the departure monitor operating in the same way as the Transport for NSW Trip Planner web site. It is recommended this is enabled, along with the &#x60;TfNSWDM&#x60; parameter.  | [optional] [default to true]
 **excludedMeans** | **String**| This parameter which means of transport to exclude from the departure monitor. To exclude one means, select one of the following: &#x60;1&#x60; &#x3D; train, &#x60;4&#x60; &#x3D; light rail, &#x60;5&#x60; &#x3D; bus, &#x60;7&#x60; &#x3D; coach, &#x60;9&#x60; &#x3D; ferry, &#x60;11&#x60; &#x3D; school bus. &#x60;checkbox&#x60; allows you to exclude more than one means of transport when used in conjunction with the &#x60;exclMOT_&lt;ID&gt;&#x60; parameters.  | [optional] 
 **exclMOT1** | **String**| Excludes train services from the departure monitor.  Must be used in conjunction with &#x60;excludedMeans&#x3D;checkbox&#x60;  | [optional] 
 **exclMOT4** | **String**| Excludes light rail services from the departure monitor.  Must be used in conjunction with &#x60;excludedMeans&#x3D;checkbox&#x60;  | [optional] 
 **exclMOT5** | **String**| Excludes bus services from the departure monitor.  Must be used in conjunction with &#x60;excludedMeans&#x3D;checkbox&#x60;  | [optional] 
 **exclMOT7** | **String**| Excludes coach services from the departure monitor.  Must be used in conjunction with &#x60;excludedMeans&#x3D;checkbox&#x60;  | [optional] 
 **exclMOT9** | **String**| Excludes ferry services from the departure monitor.  Must be used in conjunction with &#x60;excludedMeans&#x3D;checkbox&#x60;  | [optional] 
 **exclMOT11** | **String**| Excludes school bus services from the departure monitor.  Must be used in conjunction with &#x60;excludedMeans&#x3D;checkbox&#x60;  | [optional] 
 **tfNSWDM** | **String**| Including this parameter enables a number of options that result in the departure monitor operating in the same way as the Transport for NSW Trip Planner web site, including enabling real-time data. It is recommended this is enabled, along with the &#x60;departureMonitorMacro&#x60; parameter.  | [optional] [default to true]
 **version** | **String**| Indicates which version of the API the caller is expecting for both request and response data. Note that if this version differs from the version listed above then the returned data may not be as expected.  | [optional] [default to 10.2.1.42]

### Return type

[**DepartureMonitorResponse**](DepartureMonitorResponse.md)

### Authorization

[tfnsw_auth](../README.md#tfnsw_auth)

### HTTP request headers

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

<a name="tfnswStopfinderRequest"></a>
# **tfnswStopfinderRequest**
> StopFinderResponse tfnswStopfinderRequest(outputFormat, nameSf, coordOutputFormat, opts)

Provides capability to return all NSW public transport stop, station, wharf, points of interest and known addresses to be used for auto-suggest/auto-complete (to be used with the Trip planner and Departure board APIs).

This endpoint returns info about stops that match the search criteria. Matches can be sorted on &#x60;matchQuality&#x60; to determine the best matches for the given input, while the best match will be indicated by the &#x60;isBest&#x60; value. 

### Example
```javascript
var TransportForNswApi = require('transport_for_nsw_api');
var defaultClient = TransportForNswApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: tfnsw_auth
var tfnsw_auth = defaultClient.authentications['tfnsw_auth'];
tfnsw_auth.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new TransportForNswApi.DefaultApi();

var outputFormat = "outputFormat_example"; // String | Used to set the response data type. This documentation only covers responses that use the JSON format. Setting the `outputFormat` value to `rapidJSON` is required to enable JSON output. 

var nameSf = "Circular Quay"; // String | This is the search term that will be used to find locations. To lookup a coordinate, set `type_sf` to `coord`, and use the following format: `LONGITUDE:LATITUDE:EPSG:4326` (Note that longitude is first). For example, `151.206290:-33.884080:EPSG:4326`. 

var coordOutputFormat = "coordOutputFormat_example"; // String | This specifies the format the coordinates are returned in. While other variations are available, the `EPSG:4326` format will return the widely-used format.

var opts = { 
  'typeSf': "typeSf_example", // String | This specifies the type of results expected in the list of returned stops. By specifying `any`, locations of all types can be returned. If you specifically know that you're searching using a coord, specify `coord`. Likewise, if you're using a stop ID as an input, use `stop` for more accurate results. 
  'tfNSWSF': "true", // String | Including this parameter enables a number of options that result in the stop finder operating in the same way as the Transport for NSW Trip Planner web site. 
  'version': "10.2.1.42" // String | Indicates which version of the API the caller is expecting for both request and response data. Note that if this version differs from the version listed above then the returned data may not be as expected. 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.tfnswStopfinderRequest(outputFormat, nameSf, coordOutputFormat, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **outputFormat** | **String**| Used to set the response data type. This documentation only covers responses that use the JSON format. Setting the &#x60;outputFormat&#x60; value to &#x60;rapidJSON&#x60; is required to enable JSON output.  | 
 **nameSf** | **String**| This is the search term that will be used to find locations. To lookup a coordinate, set &#x60;type_sf&#x60; to &#x60;coord&#x60;, and use the following format: &#x60;LONGITUDE:LATITUDE:EPSG:4326&#x60; (Note that longitude is first). For example, &#x60;151.206290:-33.884080:EPSG:4326&#x60;.  | [default to Circular Quay]
 **coordOutputFormat** | **String**| This specifies the format the coordinates are returned in. While other variations are available, the &#x60;EPSG:4326&#x60; format will return the widely-used format. | 
 **typeSf** | **String**| This specifies the type of results expected in the list of returned stops. By specifying &#x60;any&#x60;, locations of all types can be returned. If you specifically know that you&#39;re searching using a coord, specify &#x60;coord&#x60;. Likewise, if you&#39;re using a stop ID as an input, use &#x60;stop&#x60; for more accurate results.  | [optional] 
 **tfNSWSF** | **String**| Including this parameter enables a number of options that result in the stop finder operating in the same way as the Transport for NSW Trip Planner web site.  | [optional] [default to true]
 **version** | **String**| Indicates which version of the API the caller is expecting for both request and response data. Note that if this version differs from the version listed above then the returned data may not be as expected.  | [optional] [default to 10.2.1.42]

### Return type

[**StopFinderResponse**](StopFinderResponse.md)

### Authorization

[tfnsw_auth](../README.md#tfnsw_auth)

### HTTP request headers

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

<a name="tfnswTripRequest2"></a>
# **tfnswTripRequest2**
> TripRequestResponse tfnswTripRequest2(outputFormat, coordOutputFormat, depArrMacro, typeOrigin, nameOrigin, typeDestination, nameDestination, opts)

Provides capability to provide NSW public transport trip plan options, including walking and driving legs, real-time and Opal fare information.

This endpoint is used to find a list of journeys between two locations at the specified date and time. For example, if the user is at the Airport and wants to get to Manly using public transport but isn&#39;t sure how exactly, this call will tell them exactly which train, bus, ferry or light rail to catch, and between which stops. It is extremely detailed, and includes fare/ticketing information, as well as the the specific path the vehicle(s) will take. 

### Example
```javascript
var TransportForNswApi = require('transport_for_nsw_api');
var defaultClient = TransportForNswApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: tfnsw_auth
var tfnsw_auth = defaultClient.authentications['tfnsw_auth'];
tfnsw_auth.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new TransportForNswApi.DefaultApi();

var outputFormat = "outputFormat_example"; // String | Used to set the response data type. This documentation only covers responses that use the JSON format. Setting the `outputFormat` value to `rapidJSON` is required to enable JSON output. 

var coordOutputFormat = "coordOutputFormat_example"; // String | This specifies the format the coordinates are returned in. While other variations are available, the `EPSG:4326` format will return the widely-used format.

var depArrMacro = "depArrMacro_example"; // String | This value anchors the requested date time. If set to `dep`, then trips *departing after* the specified date/time *at the specified location* are included. If set to `arr`, then trips *arriving before* the specified time *at its destination stop* are included. Works in conjunctions with the `itdDate` and `itdTime` values. 

var typeOrigin = "any"; // String | This is the type of data specified in the `name_origin` field. The origin indicates the starting point when searching for journeys. The best way to use the trip planner is to use use `any` for this field then specify a valid location ID in `type_origin`, or to use `coord` in this field and a correctly formatted coordinate in `type_origin`. 

var nameOrigin = "10101331"; // String | This value should contain a valid location/stop ID (for example, `10101100` indicates Central Station - this can be determined using `stop_finder`). It is used to indicate the starting point when searching for journeys. Alternatively, you can use a coordinate in the format `LONGITUDE:LATITUDE:EPSG:4326` (Note that longitude is first). 

var typeDestination = "any"; // String | This is the type of data specified in the `name_destination` field. The origin indicates the finishing point when searching for journeys. The best way to use the trip planner is to use use `any` for this field then specify a valid location ID in `type_destination`, or to use `coord` in this field and a correctly formatted coordinate in `type_destination`. 

var nameDestination = "10102027"; // String | This value should contain a valid location/stop ID (for example, `10101100` indicates Central Station - this can be determined using `stop_finder`). It is used to indicate the finishing point when searching for journeys. Alternatively, you can use a coordinate in the format `LONGITUDE:LATITUDE:EPSG:4326` (Note that longitude is first). 

var opts = { 
  'itdDate': "20161001", // String | The reference date used when searching trips, in `YYYYMMDD` format. For instance, `20160901` refers to 1 September 2016. Works in conjunction with the `itdTime` and `depArrMacro` values. If not specified, the current server date is used. 
  'itdTime': "1200", // String | The reference time used when searching trips, in `HHMM` 24-hour format. For instance, `2215` refers to 10:15 PM. | Works in conjunction with the `itdDate` and `depArrMacro` values. If not specified, the current server time is used. 
  'calcNumberOfTrips': 6, // Number | This parameter indicates the maximum number of trips to returned. Fewer trips may be returned anyway, depending on the available public transport services. 
  'wheelchair': "wheelchair_example", // String | Including this parameter (regardless of its value) ensures that only wheelchair-accessible options are returned. 
  'excludedMeans': "excludedMeans_example", // String | This parameter which means of transport to exclude from the trip plan. To exclude one means, select one of the following: `1` = train, `4` = light rail, `5` = bus, `7` = coach, `9` = ferry, `11` = school bus. `checkbox` allows you to exclude more than one means of transport when used in conjunction with the `exclMOT_<ID>` parameters. 
  'exclMOT1': "exclMOT1_example", // String | Excludes train services from the trip plan.  Must be used in conjunction with `excludedMeans=checkbox` 
  'exclMOT4': "exclMOT4_example", // String | Excludes light rail services from the trip plan.  Must be used in conjunction with `excludedMeans=checkbox` 
  'exclMOT5': "exclMOT5_example", // String | Excludes bus services from the trip plan.  Must be used in conjunction with `excludedMeans=checkbox` 
  'exclMOT7': "exclMOT7_example", // String | Excludes coach services from the trip plan.  Must be used in conjunction with `excludedMeans=checkbox` 
  'exclMOT9': "exclMOT9_example", // String | Excludes ferry services from the trip plan.  Must be used in conjunction with `excludedMeans=checkbox` 
  'exclMOT11': "exclMOT11_example", // String | Excludes school bus services from the trip plan.  Must be used in conjunction with `excludedMeans=checkbox` 
  'tfNSWTR': "true", // String | Including this parameter enables a number of options that result in this API call operating in the same way as the Transport for NSW Trip Planner web site, including enabling real-time data. 
  'version': "10.2.1.42" // String | Indicates which version of the API the caller is expecting for both request and response data. Note that if this version differs from the version listed above then the returned data may not be as expected. 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.tfnswTripRequest2(outputFormat, coordOutputFormat, depArrMacro, typeOrigin, nameOrigin, typeDestination, nameDestination, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **outputFormat** | **String**| Used to set the response data type. This documentation only covers responses that use the JSON format. Setting the &#x60;outputFormat&#x60; value to &#x60;rapidJSON&#x60; is required to enable JSON output.  | 
 **coordOutputFormat** | **String**| This specifies the format the coordinates are returned in. While other variations are available, the &#x60;EPSG:4326&#x60; format will return the widely-used format. | 
 **depArrMacro** | **String**| This value anchors the requested date time. If set to &#x60;dep&#x60;, then trips *departing after* the specified date/time *at the specified location* are included. If set to &#x60;arr&#x60;, then trips *arriving before* the specified time *at its destination stop* are included. Works in conjunctions with the &#x60;itdDate&#x60; and &#x60;itdTime&#x60; values.  | 
 **typeOrigin** | **String**| This is the type of data specified in the &#x60;name_origin&#x60; field. The origin indicates the starting point when searching for journeys. The best way to use the trip planner is to use use &#x60;any&#x60; for this field then specify a valid location ID in &#x60;type_origin&#x60;, or to use &#x60;coord&#x60; in this field and a correctly formatted coordinate in &#x60;type_origin&#x60;.  | [default to any]
 **nameOrigin** | **String**| This value should contain a valid location/stop ID (for example, &#x60;10101100&#x60; indicates Central Station - this can be determined using &#x60;stop_finder&#x60;). It is used to indicate the starting point when searching for journeys. Alternatively, you can use a coordinate in the format &#x60;LONGITUDE:LATITUDE:EPSG:4326&#x60; (Note that longitude is first).  | [default to 10101331]
 **typeDestination** | **String**| This is the type of data specified in the &#x60;name_destination&#x60; field. The origin indicates the finishing point when searching for journeys. The best way to use the trip planner is to use use &#x60;any&#x60; for this field then specify a valid location ID in &#x60;type_destination&#x60;, or to use &#x60;coord&#x60; in this field and a correctly formatted coordinate in &#x60;type_destination&#x60;.  | [default to any]
 **nameDestination** | **String**| This value should contain a valid location/stop ID (for example, &#x60;10101100&#x60; indicates Central Station - this can be determined using &#x60;stop_finder&#x60;). It is used to indicate the finishing point when searching for journeys. Alternatively, you can use a coordinate in the format &#x60;LONGITUDE:LATITUDE:EPSG:4326&#x60; (Note that longitude is first).  | [default to 10102027]
 **itdDate** | **String**| The reference date used when searching trips, in &#x60;YYYYMMDD&#x60; format. For instance, &#x60;20160901&#x60; refers to 1 September 2016. Works in conjunction with the &#x60;itdTime&#x60; and &#x60;depArrMacro&#x60; values. If not specified, the current server date is used.  | [optional] [default to 20161001]
 **itdTime** | **String**| The reference time used when searching trips, in &#x60;HHMM&#x60; 24-hour format. For instance, &#x60;2215&#x60; refers to 10:15 PM. | Works in conjunction with the &#x60;itdDate&#x60; and &#x60;depArrMacro&#x60; values. If not specified, the current server time is used.  | [optional] [default to 1200]
 **calcNumberOfTrips** | **Number**| This parameter indicates the maximum number of trips to returned. Fewer trips may be returned anyway, depending on the available public transport services.  | [optional] [default to 6]
 **wheelchair** | **String**| Including this parameter (regardless of its value) ensures that only wheelchair-accessible options are returned.  | [optional] 
 **excludedMeans** | **String**| This parameter which means of transport to exclude from the trip plan. To exclude one means, select one of the following: &#x60;1&#x60; &#x3D; train, &#x60;4&#x60; &#x3D; light rail, &#x60;5&#x60; &#x3D; bus, &#x60;7&#x60; &#x3D; coach, &#x60;9&#x60; &#x3D; ferry, &#x60;11&#x60; &#x3D; school bus. &#x60;checkbox&#x60; allows you to exclude more than one means of transport when used in conjunction with the &#x60;exclMOT_&lt;ID&gt;&#x60; parameters.  | [optional] 
 **exclMOT1** | **String**| Excludes train services from the trip plan.  Must be used in conjunction with &#x60;excludedMeans&#x3D;checkbox&#x60;  | [optional] 
 **exclMOT4** | **String**| Excludes light rail services from the trip plan.  Must be used in conjunction with &#x60;excludedMeans&#x3D;checkbox&#x60;  | [optional] 
 **exclMOT5** | **String**| Excludes bus services from the trip plan.  Must be used in conjunction with &#x60;excludedMeans&#x3D;checkbox&#x60;  | [optional] 
 **exclMOT7** | **String**| Excludes coach services from the trip plan.  Must be used in conjunction with &#x60;excludedMeans&#x3D;checkbox&#x60;  | [optional] 
 **exclMOT9** | **String**| Excludes ferry services from the trip plan.  Must be used in conjunction with &#x60;excludedMeans&#x3D;checkbox&#x60;  | [optional] 
 **exclMOT11** | **String**| Excludes school bus services from the trip plan.  Must be used in conjunction with &#x60;excludedMeans&#x3D;checkbox&#x60;  | [optional] 
 **tfNSWTR** | **String**| Including this parameter enables a number of options that result in this API call operating in the same way as the Transport for NSW Trip Planner web site, including enabling real-time data.  | [optional] [default to true]
 **version** | **String**| Indicates which version of the API the caller is expecting for both request and response data. Note that if this version differs from the version listed above then the returned data may not be as expected.  | [optional] [default to 10.2.1.42]

### Return type

[**TripRequestResponse**](TripRequestResponse.md)

### Authorization

[tfnsw_auth](../README.md#tfnsw_auth)

### HTTP request headers

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

