{"_id":"@dnlggr/bussi","_rev":"2-830447c8a5990c400c89e88fb61d7702","name":"@dnlggr/bussi","description":"A node wrapper for parts of the API of a public transport service","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@dnlggr/bussi","version":"0.1.0","description":"A node wrapper for parts of the API of a public transport service","homepage":"https://github.com/dnlggr/bussi","keywords":["public transport","api"],"bugs":{"url":"https://github.com/dnlggr/bussi/issues"},"main":"index.js","scripts":{"test":"./node_modules/mocha/bin/mocha"},"author":{"name":"Daniel","email":"hi@dnlggr.com","url":"https://dnlggr.com"},"license":"MIT","dependencies":{"moment":"^2.17.1","oboe":"^2.1.3"},"devDependencies":{"chai":"^3.5.0","mocha":"^3.2.0"},"gitHead":"8e483dbddeec73e01d7125a93ab45531177ec0aa","_id":"@dnlggr/bussi@0.1.0","_shasum":"04b9d763c3cb443123cfc525b5bf626a7a9eb87d","_from":".","_npmVersion":"3.8.9","_nodeVersion":"6.2.0","_npmUser":{"name":"dnlggr","email":"hi@dnlggr.com"},"dist":{"shasum":"04b9d763c3cb443123cfc525b5bf626a7a9eb87d","tarball":"https://registry.npmjs.org/@dnlggr/bussi/-/bussi-0.1.0.tgz","integrity":"sha512-mRmuW9kObEfvTDHht6z/5hwCIIOWqaQej2Hb2kpz2RBvJ7DFAuv0jDWJDaIQgVPmhsHbWtBL+hmUgJag0/gghg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGAZolW+0sVtEFN7bZu4V7e0Xg11EwUkNFRH1sdozRF4AiEA1CsTCPaZVyfHRsmq8ZWdyIDV1GnD9CqaJW1swEmYa2E="}]},"maintainers":[{"name":"dnlggr","email":"hi@dnlggr.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bussi-0.1.0.tgz_1501618958718_0.9721674467436969"}}},"readme":"# Bussi 🚌\n\n*Bussi* is a node wrapper for parts of the API of a public transport service.\n\n## What it can do\n\n- Querying bus stops, train stations, etc. 📍\n- Querying station monitors with respective lines and departure times 🖥\n\n## What it cannot do (yet)\n\n- Querying journeys from A to B 🚀\n- Querying stations by coordinates 🗺\n- Being documented very well\n\n## Installation\n\nYou can clone this repository and use *Bussi* locally but for most use cases it's probably best to install it via *npm*:\n\n``` shell\nnpm install @dnlggr/bussi \n```\n\n## Usage\n\nAs mentioned, detailed documentation is still todo. For now, see the examples below.\n\n### API Credentials\n\nBefore using *Bussi*, you must set the API credentials of the API that you want to use. You can do so by calling `use(credentials)`. The `credentials` object you set must include the following properties:\n\n- `API_URL` (`String`)\n- `CLIENT` (`Object`)\n- `USER` (`String`)\n- `PASSWORD` (`String`)\n\nYou also have to create a `credentials.js` file in the `test` directory that exports an object with the above properties in order to run the tests.\n\n#### Examples\n\n``` javascript\nconst bussi = require('@dnlggr/bussi')\n\nbussi.use({\n    API_URL: 'api.example.com',\n    CLIENT: {'id':'EXAMPLE','os':'exOS'},\n    USER: 'heinerbernadino',\n    PASSWORD: 'superSecretOMG',\n})\n```\n\n### Location\n\nA location object represents a bus stop, train station, etc.\n\n#### Examples\n\nA location object might look like this:\n\n``` javascript\n{\n    \"name\": \"Innsbruck Westbahnhof\",\n    \"id\": \"A=1@O=Innsbruck Westbahnhof@X=11391895@Y=47255843@U=81@L=470118900@B=1@p=1486421941@\",\n    \"coords\": {\n        \"lng\": 11.391895,\n        \"lat\": 47.255843\n    }\n}\n```\n\nQuerying locations:\n\n``` javascript\nconst bussi = require('@dnlggr/bussi')\n\nbussi.location.get('Westbahnhof, Innsbruck', (error, locations) => {\n    // enjoy a fresh array of locations\n})\n```\n\n### Monitor\n\nA monitor object contains all current departures for a specific location.\n\n#### Examples\n\nA monitor object might look like this:\n\n``` javascript\n{\n    \"location\": {\n        \"name\": \"Innsbruck Westbahnhof\",\n        \"id\": \"A=1@O=Innsbruck Westbahnhof@X=11391895@Y=47255843@U=81@L=470118900@B=1@p=1486421941@\",\n        \"coords\": {\n            \"lng\": 11.391895,\n            \"lat\": 47.255843\n        }\n    },\n    \"departures\": [\n        {\n            \"line\": {\n                \"name\": \"T\",\n                \"type\": \"Stadtbus\",\n                \"direction\": \"Völs EKZ Cyta Süd\"\n            },\n            \"date\": \"2017-02-07T16:48:00.000Z\"\n        },\n        (...)\n    ]\n}\n```\n\nQuerying a monitor:\n\n``` javascript\nconst bussi = require('@dnlggr/bussi')\n\n// assuming `wbhf` is a valid location object\nbussi.monitor.get(wbhf, (error, monitor) => {\n    // enjoy your fresh monitor\n})\n```\n\n## Contributions\n\nSuggestions and improvements via issues and pull requests are always welcome. 🤓\n\nYou can also find me on Twitter as [@dnlggr](https://twitter.com/dnlggr) or write an email to <hi@dnlggr.com>.\n","maintainers":[{"name":"dnlggr","email":"hi@dnlggr.com"}],"time":{"modified":"2022-06-12T17:07:30.377Z","created":"2017-08-01T20:22:39.677Z","0.1.0":"2017-08-01T20:22:39.677Z"},"homepage":"https://github.com/dnlggr/bussi","keywords":["public transport","api"],"author":{"name":"Daniel","email":"hi@dnlggr.com","url":"https://dnlggr.com"},"bugs":{"url":"https://github.com/dnlggr/bussi/issues"},"license":"MIT","readmeFilename":"README.md"}