{"id":17369789,"url":"https://github.com/juliuste/tallink","last_synced_at":"2025-10-31T07:31:24.080Z","repository":{"id":73761850,"uuid":"81863909","full_name":"juliuste/tallink","owner":"juliuste","description":"JavaScript client for the tallink API.","archived":false,"fork":false,"pushed_at":"2020-06-01T07:40:17.000Z","size":99,"stargazers_count":2,"open_issues_count":7,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-25T07:08:34.811Z","etag":null,"topics":["ferry","library","public-transport"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/juliuste.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,"governance":null}},"created_at":"2017-02-13T19:43:16.000Z","updated_at":"2019-06-14T15:39:02.000Z","dependencies_parsed_at":"2023-03-30T09:34:44.458Z","dependency_job_id":null,"html_url":"https://github.com/juliuste/tallink","commit_stats":{"total_commits":31,"total_committers":3,"mean_commits":"10.333333333333334","dds":0.4516129032258065,"last_synced_commit":"d5739de31535d61d40fcb18be04552cd133352a0"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juliuste%2Ftallink","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juliuste%2Ftallink/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juliuste%2Ftallink/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juliuste%2Ftallink/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/juliuste","download_url":"https://codeload.github.com/juliuste/tallink/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239139709,"owners_count":19588246,"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":["ferry","library","public-transport"],"created_at":"2024-10-16T00:13:53.287Z","updated_at":"2025-10-31T07:31:18.798Z","avatar_url":"https://github.com/juliuste.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tallink\n\nJavaScript client for the [tallink](https://tallink.com) ferry journey API. Complies with the [friendly public transport format](https://github.com/public-transport/friendly-public-transport-format) (`FPTF 0.0`). Inofficial, using endpoints by *Tallink*. Ask them for permission before using this module in production.\n\n[![npm version](https://img.shields.io/npm/v/tallink.svg)](https://www.npmjs.com/package/tallink)\n[![Build Status](https://travis-ci.org/juliuste/tallink.svg?branch=master)](https://travis-ci.org/juliuste/tallink)\n[![Greenkeeper badge](https://badges.greenkeeper.io/juliuste/tallink.svg)](https://greenkeeper.io/)\n[![license](https://img.shields.io/github/license/juliuste/tallink.svg?style=flat)](LICENSE)\n[![chat on gitter](https://badges.gitter.im/juliuste.svg)](https://gitter.im/juliuste)\n\n## Installation\n\n```sh\nnpm install tallink\n```\n\n## Usage\n\n```js\nconst tallink = require('tallink')\n```\n\nThe `tallink` module bundles two methods: [`stations()`](#stations) and [`journeys()`](#journeysoriginid-destinationid-startdate-enddate-opt) which follow [`FPTF`](https://github.com/public-transport/friendly-public-transport-format) `0.0`.\n\n### stations()\n\ntallink network. Returns a `Promise` that resolves in a list of all stations:\n\n```js\ntallink.stations().then(…)\n```\n\nwould give you\n\n```js\n[\n\t{type: \"station\", id: \"hel\", name: \"Helsinki\"},\n\t{type: \"station\", id: \"tal\", name: \"Tallinn\"},\n\t{type: \"station\", id: \"sto\", name: \"Stockholm\"},\n\t{type: \"station\", id: \"tur\", name: \"Turku\"},\n\t{type: \"station\", id: \"rig\", name: \"Riga\"},\n\t{type: \"station\", id: \"ala\", name: \"Åland\"},\n\t{type: \"station\", id: \"vis\", name: \"Visby\"}\n]\n```\n\n### journeys(originID, destinationID, startDate, endDate, opt)\n\nFind journeys for a given time period (in days). Returns a `Promise` that resolves in a list of matching journeys.\n\n```js\ntallink.journeys(originID, destinationID, startDate, endDate, opt).then(…)\ntallink.journeys(\n\t'tal', // Tallinn\n\t'hel', // Helsinki\n\tnew Date('2017-03-02T00:00:00'),\n\tnew Date('2017-03-05T00:00:00'), // setting this to the same day as startDate would give you results for a single day\n\t// default options\n\t{\n\t\tlocale: 'en', // route name language\n\t\tcountry: 'DE',\n\t\tincludeOvernight: true\n\t}\n).then(…)\n```\n\nwould give you\n\n```js\n[\n\t{\n\t\ttype: \"journey\",\n\t\tid: \"1565203\",\n\t\trouteInfo: {\n\t\t\tid: \"tal-hel\",\n\t\t\tname: \"Tallinn-Helsinki\"\n\t\t},\n\t\tovernight: false,\n\t\tlegs: [{\n\t\t\torigin: {\n\t\t\t\ttype: \"station\",\n\t\t\t\tid: \"tal\",\n\t\t\t\tpier: \"DTER\"\n\t\t\t},\n\t\t\tdestination: {\n\t\t\t\ttype: \"station\",\n\t\t\t\tid: \"hel\",\n\t\t\t\tpier: \"LSA2\"\n\t\t\t},\n\t\t\tdeparture: \"2017-03-02T07:30:00.000Z\", // Date() Object\n\t\t\tarrival: \"2017-03-02T09:30:00.000Z\", // Date() Object\n\t\t\tship: \"MEGASTAR\",\n\t\t\trooms: true,\n\t\t\toperator: \"tallink\",\n\t\t\tmode: \"ferry\",\n\t\t\tpublic: true\n\t\t}],\n\t\tprice: {\n\t\t\tamount: 36,\n\t\t\tcurrency: \"EUR\"\n\t\t}\n\t}\n\t// …\n]\n```\n\n## Contributing\n\nIf you found a bug, want to propose a feature or feel the urge to complain about your life, feel free to visit [the issues page](https://github.com/juliuste/tallink/issues).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuliuste%2Ftallink","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuliuste%2Ftallink","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuliuste%2Ftallink/lists"}