{"id":17137146,"url":"https://github.com/alex3165/gymbox-bot","last_synced_at":"2025-04-13T09:25:53.154Z","repository":{"id":13500517,"uuid":"74607027","full_name":"alex3165/gymbox-bot","owner":"alex3165","description":"Simplify the booking of a gymbox class.","archived":false,"fork":false,"pushed_at":"2023-03-01T18:17:02.000Z","size":801,"stargazers_count":23,"open_issues_count":11,"forks_count":12,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-04-14T12:29:19.435Z","etag":null,"topics":["cli","cron","gymbox","nodejs","schedule"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alex3165.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-11-23T19:20:01.000Z","updated_at":"2024-01-10T11:29:27.000Z","dependencies_parsed_at":"2024-10-14T20:06:22.395Z","dependency_job_id":"69e6fef2-ba21-4227-91b7-16df6ac31470","html_url":"https://github.com/alex3165/gymbox-bot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex3165%2Fgymbox-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex3165%2Fgymbox-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex3165%2Fgymbox-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex3165%2Fgymbox-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alex3165","download_url":"https://codeload.github.com/alex3165/gymbox-bot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248690077,"owners_count":21146057,"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":["cli","cron","gymbox","nodejs","schedule"],"created_at":"2024-10-14T20:06:21.173Z","updated_at":"2025-04-13T09:25:53.127Z","avatar_url":"https://github.com/alex3165.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![gif](https://media.giphy.com/media/3oz8xK9ER0CRMAhozK/giphy.gif)\n\n# Gymbox bot\n\nProvide you a complete experience to automate booking of your gymbox classes:\n\n- API: Add class to book\n- Scheduler: Cron to run on your server to check class to book everydays at 7am\n- Cli: Book a class using command line\n\n## How to make a booking\n\nFirst you need to add your `email` and `password` into a `./data/config.json`, example:\n\n```json\n{\n  \"email\": \"YOUR_EMAIL_HERE\",\n  \"password\": \"YOUR_PASSWORD_HERE\"\n}\n```\n\nSecondly you need to add the class you want to book to either the `./data/classes.json` file, using the date as the key,\nor for recurring bookings by adding the class you want to book to the `./data/classesByDay.json` file. Format for\nclasses.json is:\n\n```json\n{\n  \"2017-06-21\": {\n    \"className\": \"Gymnastic Conditioning\",\n    \"time\": \"12:15\",\n    \"location\": \"Farringdon\"\n  }\n}\n```\n\nFormat for classesByDay.json is:\n\n```json\n{\n  \"Monday\": {\n    \"className\": \"Gymnastic Conditioning\",\n    \"time\": \"12:15\",\n    \"location\": \"Farringdon\"\n  }\n}\n```\n\n### Using the cli\n\n```\nnode cli.js -c run\n```\n\n### Using the scheduler\n\n\u003e Edit cron expression in `scheduler.js` then:\n\n```\nnode scheduler.js\n```\n\n## How to use the API\n\n```\nnode api.js\n```\n\nEndpoints:\n\n- GET: `/api/table`: return the gymbox time table\n\n  - Query params:\n    - `email`: Gymbox user email\n    - `password`: Gymbox user password\n\n- GET: `/api/add`: Add a class to book\n  - Query params:\n    - `email`: Gymbox user email\n    - `password`: Gymbox user password\n    - `className`: The name of the class to book\n    - `time`: The time of the class to book, format: HH:mm\n    - `date`: The date of the class to book, format: YYYY-MM-DD\n    - `location`: The gym location of the class to book\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falex3165%2Fgymbox-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falex3165%2Fgymbox-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falex3165%2Fgymbox-bot/lists"}