{"id":20078695,"url":"https://github.com/wpdas/dublinbus-client","last_synced_at":"2026-06-07T02:31:17.462Z","repository":{"id":57216930,"uuid":"133745075","full_name":"wpdas/dublinbus-client","owner":"wpdas","description":"Node RTPI JavaScript Client to get Dublin Bus informations.","archived":false,"fork":false,"pushed_at":"2018-05-30T17:50:42.000Z","size":100,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-13T06:40:30.011Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wpdas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-17T02:00:22.000Z","updated_at":"2018-05-30T17:50:21.000Z","dependencies_parsed_at":"2022-08-28T21:01:47.060Z","dependency_job_id":null,"html_url":"https://github.com/wpdas/dublinbus-client","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpdas%2Fdublinbus-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpdas%2Fdublinbus-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpdas%2Fdublinbus-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpdas%2Fdublinbus-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wpdas","download_url":"https://codeload.github.com/wpdas/dublinbus-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241509658,"owners_count":19974071,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T15:16:16.257Z","updated_at":"2026-06-07T02:31:17.214Z","avatar_url":"https://github.com/wpdas.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RTPI JavaScript Client\n![Dublin Bus Logo](https://www.dublinbus.ie/Templates/Public/Styles/Images/logo_dublinbus.jpg)\n\n## About \nThis module provides information from the \n[Dublin Bus REST API](https://data.gov.ie/dataset/real-time-passenger-information-rtpi-for-dublin-bus-bus-eireann-luas-and-irish-rail).\n\nIt's possible to get information about:\n* Realtime information by stop number/stop id;\n* Filtered realtime information by route number/route id;\n* All Bus stops;\n* Filtered bus stops by address;\n* All Routes;\n* Filtered route list by route name/route id\n\n## Examples\nYou have to install the module before you can use it:\n```bash\nnpm install --save dublinbus-client\n```\n\nIf you want, you can run the tests (Mocha):\n```bash\nnpm test\n```\n\nHow to use it:\n\n```javascript\nconst dublinBusClient = require('dublinbus-client');\n\n// Realtime information by stop number/stop id\ndublinBusClient.realtimeBusInformation.getInformationByStopId(515)\n  .then(console.log)\n  .catch(console.error);\n\n/*\n{\n  \"errorcode\": \"0\",\n  \"errormessage\": \"\",\n  \"numberofresults\": 25,\n  \"stopid\": \"515\",\n  \"timestamp\": \"16/05/2018 19:32:34\",\n  \"results\": [\n      {\n        \"arrivaldatetime\": \"16/05/2018 19:37:22\",\n        \"duetime\": \"4\",\n        \"departuredatetime\": \"16/05/2018 19:37:22\",\n        \"departureduetime\": \"4\",\n        \"scheduledarrivaldatetime\": \"16/05/2018 19:38:00\",\n        \"scheduleddeparturedatetime\": \"16/05/2018 19:38:00\",\n        \"destination\": \"Beaumont\",\n        \"destinationlocalized\": \"Beaumont\",\n        \"origin\": \"Dundrum\",\n        \"originlocalized\": \"Dundrum\",\n        \"direction\": \"Inbound\",\n        \"operator\": \"bac\",\n        \"additionalinformation\": \"\",\n        \"lowfloorstatus\": \"no\",\n        \"route\": \"14\",\n        \"sourcetimestamp\": \"16/05/2018 19:31:44\",\n        \"monitored\": \"true\"\n    },\n    {\n        \"arrivaldatetime\": \"16/05/2018 19:37:30\",\n        \"duetime\": \"4\",\n        ....\n*/\n\n// Filtered realtime information by route number/route id\nlet stopNumber = 2;\nlet routeNumber = 38\ndublinBusClient.realtimeBusInformation.getInformationByStopId(stopNumber, routeNumber)\n  .then(console.log)\n  .catch(console.error);\n\n/*\n{\n  \"errorcode\": \"0\",\n  \"errormessage\": \"\",\n  \"numberofresults\": 1,\n  \"stopid\": \"2\",\n  \"timestamp\": \"16/05/2018 23:44:28\",\n  \"results\": [\n      {\n          \"arrivaldatetime\": \"17/05/2018 00:02:07\",\n          \"duetime\": \"17\",\n          \"departuredatetime\": \"17/05/2018 00:02:07\",\n          \"departureduetime\": \"17\",\n          \"scheduledarrivaldatetime\": \"16/05/2018 23:32:00\",\n          \"scheduleddeparturedatetime\": \"16/05/2018 23:32:00\",\n          \"destination\": \"Damastown\",\n          \"destinationlocalized\": \"Baile Dama\",\n          \"origin\": \"Burlington Road\",\n          \"originlocalized\": \"Burlington Road\",\n          \"direction\": \"Outbound\",\n          \"operator\": \"bac\",\n          \"additionalinformation\": \"\",\n          \"lowfloorstatus\": \"no\",\n          \"route\": \"38\",\n          \"sourcetimestamp\": \"16/05/2018 23:27:09\",\n          \"monitored\": \"true\"\n      }\n  ]\n}\n*/\n\n// All bus stops\ndublinBusClient.busStop.getAllInformation()\n  .then(console.log)\n  .catch(console.error);\n\n/*\n{ errorcode: '0',\n  errormessage: '',\n  numberofresults: 4683,\n  timestamp: '17/05/2018 02:35:58',\n  results: \n   [ { stopid: '2',\n       displaystopid: '2',\n       shortname: 'Parnell Square',\n       shortnamelocalized: 'Cearnóg Parnell',\n       fullname: 'Parnell Square',\n       fullnamelocalized: '',\n       latitude: '53.35224111',\n       longitude: '-6.263695',\n       lastupdated: '08/05/2018 09:12:08',\n       operators: [Array] },\n       {...}]}\n*/\n\n// Filtered bus stops by address\ndublinBusClient.busStop.getByAddress('Parnell Square')\n  .then(console.log)\n  .catch(console.error);\n\n/*\n{ errorcode: '0',\n  errormessage: '',\n  numberofresults: 13,\n  timestamp: '17/05/2018 02:38:00',\n  results: \n   [ { stopid: '2',\n       displaystopid: '2',\n       shortname: 'Parnell Square',\n       shortnamelocalized: 'Cearnóg Parnell',\n       fullname: 'Parnell Square',\n       fullnamelocalized: '',\n       latitude: '53.35224111',\n       longitude: '-6.263695',\n       lastupdated: '08/05/2018 09:12:08',\n       operators: [Array] },\n     { stopid: '3',\n       displaystopid: '3',\n       shortname: 'Parnell Square',\n       shortnamelocalized: 'Cearnóg Parnell',\n       fullname: 'Parnell Square',\n       fullnamelocalized: '',\n       latitude: '53.35230694',\n       longitude: '-6.263783056',\n       lastupdated: '08/05/2018 09:12:08',\n       operators: [Array] },\n       {...}]}\n*/\n\n// All Routes\ndublinBusClient.routeList.getRoute()\n  .then(console.log)\n  .catch(console.error);\n\n/*\n{ errorcode: '0',\n  errormessage: '',\n  numberofresults: 239,\n  timestamp: '17/05/2018 02:32:58',\n  results: \n   [ { route: '1' },\n     { route: '102' },\n     { route: '104' },\n     { route: '11' },\n     { route: '111' },\n     { route: '114' },\n     { route: '116' },\n     { route: '118' },\n     { route: '120' },\n     { route: '122' },\n     { route: '123' },\n     { route: '13' },\n     { route: '130' },\n     { route: '14' },\n     { route: '140' },\n     { route: '142' },\n     { route: '145' },\n     { route: '14C' },\n     ...]}\n*/\n\n// Filtered route list by route name/route id\nlet routeid = '66'; //66X\ndublinBusClient.routeList.getRoute(routeid)\n  .then(console.log)\n  .catch(console.error);\n\n/* Output:\n{ errorcode: '0',\n  errormessage: '',\n  numberofresults: 239,\n  timestamp: '17/05/2018 02:28:40',\n  results: \n   [ { route: '66' },\n     { route: '66A' },\n     { route: '66B' },\n     { route: '66X' },\n     { route: '66' },\n     { route: '66A' } ] }\n*/\n\n```\n\n# License\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwpdas%2Fdublinbus-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwpdas%2Fdublinbus-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwpdas%2Fdublinbus-client/lists"}