@stockholm-transit/locations
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "@stockholm-transit/locations", | ||
"description": "API for Storstockholms Lokaltrafiks' locations", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"type": "commonjs", | ||
@@ -34,4 +34,4 @@ "license": "MIT", | ||
"peerDependencies": { | ||
"@stockholm-transit/shared": "1.0.0" | ||
"@stockholm-transit/shared": "1.0.1" | ||
} | ||
} |
# @stockholm-transit/locations | ||
[Storstockholms Lokaltrafiks (SL) Location lookup v1.0](https://www.trafiklab.se/api/trafiklab-apis/sl/stop-lookup/) | ||
With this API, you can get information about a place by submitting parts of the place name. You can choose to search only for stop areas or stops, addresses and locations. | ||
[Storstockholms Lokaltrafiks (SL) Location lookup v1.0](https://www.trafiklab.se/api/trafiklab-apis/sl/stop-lookup/): | ||
- With this API, you can get information about a place by submitting parts of the place name. You can choose to search only for stop areas or stops, addresses and locations. | ||
## Usage | ||
@@ -18,8 +19,29 @@ | ||
## Types | ||
### LocationParameters | ||
| Parameter | Type | Required | Description | Default | | ||
| ------------ | ----------------------------------------------- | -------- | -------------------------------------- | ------- | | ||
| q | string | true | The search string. (Max 20 characters) | | | ||
| stationsOnly | boolean | false | If `true` only stops are returned. | `true` | | ||
| maxResults | number | false | Maximum number of results from 0-50 | `10` | | ||
| type | [LocationParameterType](#LocationParameterType) | false | Type filter for places. | `"ALL"` | | ||
### LocationParameterType | ||
- `"S"`: Search for stations only | ||
- `"P"`: Search for only POI (points of interest) | ||
- `"A"`: Search only for addresses | ||
- `"SP"`: Search for stations and POI | ||
- `"SA"`: Search only for stations and Addresses | ||
- `"AP"`: Search only for addresses and POI | ||
- `"ALL"`: Search for addresses, stations and POI | ||
## Building | ||
Run `nx build @stockholm-transit/locations` to build the library. | ||
Run `npx nx build @stockholm-transit/locations` to build the library. | ||
## Running unit tests | ||
Run `nx test @stockholm-transit/locations` to execute the unit tests via [Jest](https://jestjs.io). | ||
Run `npx nx test @stockholm-transit/locations` to execute the unit tests via [Jest](https://jestjs.io). |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10778
47