Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
dublin-transport-js
Advanced tools
An attempt to better organise the APIs of the three major public transport providers in the Dublin Area.
Readme
Welcome to the Dublin Area Transport API. This API can be used to access various endpoints which provide information on the three major forms of public transport in the Dublin area, Dublin Bus, Luas and DART.
To authorize, use this code:
const api = require('dublintransportjs');
api.authorize('your-key-here');
Make sure to replace
your-key-here
with your API key.
The Dublin Area Transport API uses API keys to allow higher limits to the API. In the future you will be able to register a new API key at our developer portal.
An API key need not be included in the request but you will be limited to 120 requests per hour without one, you will be able to contact us at the developer portal if you require more requests.
Auth: your-key-here
your-key-here
with your personal API key.
const api = require('dublintransportjs');
api.authorize('your-key-here');
api.bus.get().then(stops => stops);
The above command returns JSON structured like this:
[
{
"id": 6,
"name": "St. Martin's Chapel",
"location": {
"latitude": 53.352744,
"longitude": -6.264443
},
"routes": ["4"]
},
{
"id": 7,
"name": "Parnell Square",
"location": {
"latitude": 53.35283611,
"longitude": -6.264561944
},
"routes": ["40", "140", "40D", "40B", "13"]
}
]
This endpoint retrieves all bus stops.
GET https://dublintransportapi.herokuapp.com/api/bus/stops
const api = require('dublintransportjs');
api.authorize('your-key-here');
api.bus.get(543).then(stop => stop);
The above command returns JSON structured like this:
{
"id": 543,
"name": "Dublin Rd",
"location": {
"latitude": 53.385055,
"longitude": -6.142371111
},
"routes": ["31", "31A", "32", "31B"],
"services": [
{
"due": 11,
"destination": "Malahide",
"route": "32"
},
{
"due": 14,
"destination": "Sheilmartin Rd",
"route": "31A"
},
]
}
This endpoint retrieves the realtime information of a specific bus stop.
Inside HTML code blocks like this one, you can't use Markdown, so use<code>
blocks to denote code.
GET https://dublintransportapi.herokuapp.com/api/bus/stops/<ID>
Parameter | Description |
---|---|
ID | The ID of the bus stop to retrieve. |
const api = require('dublintransportjs');
api.authorize('your-key-here');
api.bus.nearby({ latitude: 53.3498, longitude: -6.2603 }).then(nearby => nearby);
The above command returns JSON structured like this:
[
{
"id": 318,
"name": "Westmoreland Street",
"location": {
"latitude": 53.34630111,
"longitude": -6.259078889
},
"routes": ["25X", "66X", "67X"],
"distance": 299.47
},
{
"id": 265,
"name": "Parnell Square",
"location": {
"latitude": 53.35335806,
"longitude": -6.26203
},
"routes": ["38", "38A", "1", "38D", "38B", "44"],
"distance": 300.76
},
]
This endpoint lists all stops within 15 minutes walking distance along with the walking distance specific to each stop.
POST https://dublintransportapi.herokuapp.com/api/bus/stops/nearby
Parameter | Description |
---|---|
location | An object containing latitude and longitude coordinates. |
const api = require('dublintransportjs');
api.authorize('your-key-here');
api.dart.get().then(stops => stops);
The above command returns JSON structured like this:
[
{
"name": "Shankill",
"location": {
"longitude": -6.11691,
"latitude": 53.2364
},
"code": "SKILL",
"id": 136
},
{
"name": "Bray",
"location": {
"longitude": -6.10046,
"latitude": 53.2043
},
"code": "BRAY",
"id": 140
}
]
This endpoint retrieves all dart stops.
GET https://dublintransportapi.herokuapp.com/api/dart/stops
const api = require('dublintransportjs');
api.authorize('your-key-here');
api.dart.get('DLERY').then(stop => stop);
The above command returns JSON structured like this:
{
"name": "Dun Laoghaire",
"location": {
"longitude": -6.13498,
"latitude": 53.2951
},
"code": "DLERY",
"id": 131,
"services": [
{
"destination": "Bray",
"location": "Arrived Blackrock",
"due": 6,
"type": "DART",
"direction": "Southbound"
},
{
"destination": "Howth",
"location": "Departed Killiney",
"due": 10,
"type": "DART",
"direction": "Northbound"
}
]
}
This endpoint retrieves realtime information of a specific dart station.
Inside HTML code blocks like this one, you can't use Markdown, so use<code>
blocks to denote code.
GET https://dublintransportapi.herokuapp.com/api/dart/stops/<CODE>
Parameter | Description |
---|---|
CODE | The code of the dart stop to retrieve. |
curl "http://localhost:3000/api/dart/stops/nearby"
-H "Auth: your-key-here"
-H "Content-Type: application/json"
-d '{ "location": { "latitude": 53.342998628, "longitude": -6.256165642 } }'
const api = require('dublintransportjs');
api.authorize('your-key-here');
api.dart.nearby({ latitude: 53.342998628, longitude: -6.256165642 }).then(nearby => nearby);
The above command returns JSON structured like this:
[
{
"name": "Dublin Pearse",
"location": {
"longitude": -6.24829,
"latitude": 53.3433
},
"code": "PERSE",
"id": 150,
"distance": 503.55
},
{
"name": "Tara Street",
"location": {
"longitude": -6.25425,
"latitude": 53.347
},
"code": "TARA",
"id": 124,
"distance": 759.2
}
]
This endpoint lists all stops within 15 minutes walking distance along with the walking distance specific to each stop.
POST https://dublintransportapi.herokuapp.com/api/dart/stops/nearby
Parameter | Description |
---|---|
location | An object containing latitude and longitude coordinates. |
const api = require('dublintransportjs');
api.authorize('your-key-here');
api.luas.get().then(stops => stops);
The above command returns JSON structured like this:
[
{
"id": 47,
"name": "Cherrywood",
"code": "CHE",
"location": {
"longitude": -6.14585277777778,
"latitude": 53.2453333333333
}
},
{
"id": 48,
"name": "Bride's Glen",
"code": "BRI",
"location": {
"longitude": -6.1427831,
"latitude": 53.2418708
}
}
]
This endpoint retrieves all luas stops.
GET https://dublintransportapi.herokuapp.com/api/luas/stops
const api = require('dublintransportjs');
api.authorize('your-key-here');
api.luas.get('CHE').then(stop => stop);
The above command returns JSON structured like this:
{
"id": 47,
"name": "Cherrywood",
"code": "CHE",
"location": {
"longitude": -6.14585277777778,
"latitude": 53.2453333333333
},
"services": [
{
"direction": "Inbound",
"destination": "Broombridge",
"due": 10
},
{
"direction": "Outbound",
"destination": "Bride's Glen",
"due": 10
}
]
}
This endpoint retrieves realtime information about a specific luas stop.
Inside HTML code blocks like this one, you can't use Markdown, so use<code>
blocks to denote code.
GET https://dublintransportapi.herokuapp.com/api/luas/stops/<CODE>
Parameter | Description |
---|---|
CODE | The code of the luas stop to retrieve. |
const api = require('dublintransportjs');
api.authorize('your-key-here');
api.luas.nearby({ latitude: 53.3498, longitude: -6.2603 }).then(nearby => nearby);
The above command returns JSON structured like this:
[
{
"id": 62,
"name": "Marlborough",
"code": "MAR",
"location": {
"latitude": 53.3492449,
"longitude": -6.2577316
},
"distance": 180.91
},
{
"id": 21,
"name": "Abbey Street",
"code": "ABB",
"location": {
"longitude": -6.25817222222222,
"latitude": 53.3485888888889
},
"distance": 195.62
}
]
This endpoint lists all stops within 15 minutes walking distance along with the walking distance specific to each stop.
POST https://dublintransportapi.herokuapp.com/api/luas/stops/nearby
Parameter | Description |
---|---|
location | An object containing latitude and longitude coordinates. |
const api = require('dublintransportjs');
api.authorize('your-key-here');
api.nearby({ latitude: 53.3515, longitude: -6.2497 }).then(stops => stops);
The above command returns JSON structured like this:
[{
"name": "dart",
"service": [{
"name": "Dublin Connolly",
"location": {
"longitude": -6.24591,
"latitude": 53.3531
},
"code": "CNLLY",
"id": 100,
"distance": 384.92
},
{
"name": "Tara Street",
"location": {
"longitude": -6.25425,
"latitude": 53.347
},
"code": "TARA",
"id": 124,
"distance": 706.94
}
]
},
{
"name": "luas",
"service": [{
"id": 23,
"name": "Connolly",
"code": "CON",
"location": {
"longitude": -6.24994166666667,
"latitude": 53.3509222222222
},
"distance": 62.12
},
{
"id": 22,
"name": "Busáras",
"code": "BUS",
"location": {
"latitude": 53.3500984,
"longitude": -6.2514561
},
"distance": 175.55
}
]
},
{
"name": "bus",
"service": [{
"id": 1500,
"name": "Amiens Street",
"location": {
"latitude": 53.35102,
"longitude": -6.250105
},
"routes": ["151", "27"],
"distance": 47.8
},
{
"id": 620,
"name": "Talbot Place",
"location": {
"latitude": 53.350965,
"longitude": -6.252734
},
"routes": ["32", "31B", "31", "29A", "31A", "27A", "130", "747"],
"distance": 174.45
}
]
}
]
This endpoint lists all stops of all three transport services within 15 minutes walking distance along with the walking distance specific to each stop.
GET https://dublintransportapi.herokuapp.com/api/nearby
FAQs
An attempt to better organise the APIs of the three major public transport providers in the Dublin Area.
The npm package dublin-transport-js receives a total of 5 weekly downloads. As such, dublin-transport-js popularity was classified as not popular.
We found that dublin-transport-js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.