{"id":28146975,"url":"https://github.com/martvdm/trainapi","last_synced_at":"2026-04-24T16:04:36.425Z","repository":{"id":40650937,"uuid":"476354056","full_name":"martvdm/TrainAPI","owner":"martvdm","description":"A discord bot that can trace calamities \u0026 departure/arrival times of stations. This bot uses the NS API, more information: https://apiportal.ns.nl/","archived":true,"fork":false,"pushed_at":"2022-04-30T18:03:28.000Z","size":92,"stargazers_count":2,"open_issues_count":3,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-05-14T23:15:33.354Z","etag":null,"topics":["bot","discord","discord-bot","discord-py","nederlandse-spoorwegen-api"],"latest_commit_sha":null,"homepage":"","language":"Python","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/martvdm.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":"2022-03-31T14:57:34.000Z","updated_at":"2023-12-01T19:45:47.000Z","dependencies_parsed_at":"2022-08-10T00:00:33.686Z","dependency_job_id":null,"html_url":"https://github.com/martvdm/TrainAPI","commit_stats":null,"previous_names":[],"tags_count":1,"template":true,"template_full_name":null,"purl":"pkg:github/martvdm/TrainAPI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martvdm%2FTrainAPI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martvdm%2FTrainAPI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martvdm%2FTrainAPI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martvdm%2FTrainAPI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/martvdm","download_url":"https://codeload.github.com/martvdm/TrainAPI/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martvdm%2FTrainAPI/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32230422,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T13:21:15.438Z","status":"ssl_error","status_checked_at":"2026-04-24T13:21:15.005Z","response_time":64,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["bot","discord","discord-bot","discord-py","nederlandse-spoorwegen-api"],"created_at":"2025-05-14T23:15:19.051Z","updated_at":"2026-04-24T16:04:36.409Z","avatar_url":"https://github.com/martvdm.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Bot logo](https://cdn.discordapp.com/attachments/885185159522041867/962433451779309588/trainapi.PNG)\n\n\u003e A discord bot that can trace calamities \u0026amp; departure/arrival times of stations. This bot uses the NS API, more information: https://apiportal.ns.nl/\n\n\n\n# Setup:\n**Create a discord APP/bot:**\n\n\u003e **Please read:** https://discordjs.guide/preparations/setting-up-a-bot-application.html\n\n**Clone the repository:**\n```bash\ngit clone https://github.com/martvdm/TrainAPI.git\n```\n\n**Install packages:**\n```bash\npip install -r requirements.txt\n```\n\n**Create a config file:**\n```bash\ncp config.example.json config.json\n```\n\n**Fill in the config.json file:**\n\n```json\n{\n  \"token\": \"BOT_TOKEN\",  \u003c-- Replace with your discord-bot token\n  \"language\": \"en, nl\", \u003c-- Your language\n  \"api\": {\n    ---\u003e The NS-Primary key is needed to gain acces to the API\n    ---\u003e make an account at \"https://apiportal.ns.nl/signin?ReturnUrl=%2F\"\n    \"NS-PRIMARY\": \"Ocp-Apim-Subscription-Key\" \u003c-- Replace with your NS-Primary key\n  },\n  \"app\": {\n    \"author\": \"Mart\",\n    \"invite\": \"https://discord.com/api/oauth2/authorize?client_id=CLIENT_ID\u0026permissions=8\u0026scope=bot%20applications.commands\", \u003c-- Modify the url with your client id\n    \"testing\": {\n      \"server\": \"TEST-SERVER-ID\", \u003c-- Replace with your test server id (optional)\n      \"channel\": \"TEST-CHANNEL-ID\" \u003c-- Replace with your test channel id (optional)\n    }\n  },\n  \"database\": { \n    \"host\": \"localhost\", \u003c-- Replace with your database IP\n    \"port\": 3036, \u003c-- Replace with your database port\n    \"database\": \"database\", \u003c-- Replace with your database name\n    \"username\": \"root\", \u003c-- Replace with your database username\n    \"password\": \"\"  \u003c-- Replace with your database password\n  }\n}\n```\n\n**Run the bot:**\n```bash\npython3 main.py\n```\n\n**Invite the bot to your server**\n\n\u003e replace the CLIENT_ID with the client id of your bot\n\u003e \n\u003e https://discordapp.com/api/oauth2/authorize?client_id=CLIENT_ID\u0026permissions=8\u0026scope=bot%20applications.commands\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartvdm%2Ftrainapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmartvdm%2Ftrainapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartvdm%2Ftrainapi/lists"}