{"id":45517612,"url":"https://github.com/lbkulinski/cta-smokers-api","last_synced_at":"2026-03-04T03:04:14.976Z","repository":{"id":339817670,"uuid":"1162827364","full_name":"lbkulinski/cta-smokers-api","owner":"lbkulinski","description":"An API to track incidents of smoking on CTA trains","archived":false,"fork":false,"pushed_at":"2026-02-28T06:22:34.000Z","size":78,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-28T11:19:06.975Z","etag":null,"topics":["api","cta","java","spring-boot"],"latest_commit_sha":null,"homepage":"https://ctasmokers.com","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lbkulinski.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-20T18:40:41.000Z","updated_at":"2026-02-28T02:31:54.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/lbkulinski/cta-smokers-api","commit_stats":null,"previous_names":["lbkulinski/cta-smokers-api"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/lbkulinski/cta-smokers-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lbkulinski%2Fcta-smokers-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lbkulinski%2Fcta-smokers-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lbkulinski%2Fcta-smokers-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lbkulinski%2Fcta-smokers-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lbkulinski","download_url":"https://codeload.github.com/lbkulinski/cta-smokers-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lbkulinski%2Fcta-smokers-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30070479,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T01:03:42.280Z","status":"online","status_checked_at":"2026-03-04T02:00:07.464Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["api","cta","java","spring-boot"],"created_at":"2026-02-22T21:12:10.828Z","updated_at":"2026-03-04T03:04:14.971Z","avatar_url":"https://github.com/lbkulinski.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚭 CTA Smokers API\n\nCrowdsourced smoking reports on Chicago CTA trains --- simple,\ntransparent, and public.\n\nThe **CTA Smokers API** powers https://ctasmokers.com and provides a\nclean REST interface for reporting and retrieving smoking incidents on\nCTA trains. Built to help riders make informed decisions in real time.\n\n------------------------------------------------------------------------\n\n## 🚇 Overview\n\nThe API provides structured access to community-submitted smoking\nreports:\n\n- Submit reports with line, car number, run number, and direction\n- Retrieve recent reports by date\n- ISO-8601 timestamps and predictable JSON schema\n- Designed for dashboards, mobile apps, and data analysis\n\n------------------------------------------------------------------------\n\n## 🌐 Base URL\n\n    https://api.ctasmokers.com\n\n\u003e All responses are JSON.\\\n\u003e No authentication required for read endpoints.\\\n\u003e Write endpoints are rate-limited to prevent abuse.\n\n------------------------------------------------------------------------\n\n## 📄 OpenAPI Specification\n\nThe full OpenAPI spec is available for developers who want to generate clients or explore endpoints interactively.\n\n**Endpoints:**\n\n* `GET /v3/api-docs` — JSON format (OpenAPI 3.1)\n\nYou can view or import it directly in tools like [Swagger Editor](https://editor.swagger.io/) or [Postman](https://www.postman.com/).\n\nExample:\n\n``` bash\ncurl -s https://api.ctasmokers.com/v3/api-docs | jq '.'\n```\n\n------------------------------------------------------------------------\n\n## 🧩 Example Usage\n\n### Submit a smoking report\n\n``` bash\ncurl -X POST https://api.ctasmokers.com/api/cta/reports/smoking -H \"Content-Type: application/json\" -d '{\n    \"line\": \"RED\",\n    \"destinationId\": \"40900\",\n    \"nextStationId\": \"41220\",\n    \"carNumber\": \"2435\",\n    \"runNumber\": \"902\" // Optional, but helps identify the train and track patterns over time\n}'\n```\n\n### Fetch today's reports\n\n``` bash\ncurl -s https://api.ctasmokers.com/api/cta/reports/smoking/$(date +%F) | jq '[.reports[] | {line, destinationId, carNumber, reportedAt}]'\n```\n\n------------------------------------------------------------------------\n\n## 📚 Endpoints\n\n### Smoking Reports\n\n- `POST /api/cta/reports/smoking` — Submit a new smoking report.\n- `GET /api/cta/reports/smoking/{date}` — List reports by date.\n- `GET /api/cta/reports/smoking/{date}/{reportId}` — Retrieve a specific report.\n\n------------------------------------------------------------------------\n\n## 🗂 Data Model\n\n### Smoking Report\n\n``` json\n{\n  \"reportId\": \"1771710202399_7a8dcb0d-aea9-4c37-89d6-fc79fe3ba77f\",\n  \"reportedAt\": \"2026-02-21T21:00:22.399660Z\",\n  \"expiresAt\": \"2026-02-21T21:30:22.399660Z\",\n  \"date\": \"2026-02-21\",\n  \"line\": \"RED\",\n  \"destinationId\": \"40900\",\n  \"nextStationId\": \"41220\",\n  \"carNumber\": \"2435\",\n  \"runNumber\": \"902\" // Optional, but helps identify the train and track patterns over time\n}\n```\n\n------------------------------------------------------------------------\n\n## ⚙️ Conventions\n\n- **Timestamps**: ISO-8601 UTC (`Instant.toString()`)\n- **Dates**: `yyyy-MM-dd`\n- **Report IDs**: `epochMillis_UUID`\n- **Expiration**: Reports may include a TTL (`expiresAt`) for  automatic cleanup\n- **Line**: Standard CTA identifiers (`RED`, `BLUE`, `BROWN`, etc.)\n- **Destination/Next Station IDs**: CTA's numeric codes for stations,\nfound [here](https://data.cityofchicago.org/resource/8pix-ypme.json)\n  - The smoking report API makes use of the `map_id` field\n\n------------------------------------------------------------------------\n\n## 🧠 Design Goals\n\n- **Public transparency**\n- **Community-powered**\n- **Low friction**\n- **Developer friendly**\n- **Lightweight infrastructure**\n\n------------------------------------------------------------------------\n\n## 🔒 Moderation \u0026 Integrity\n\n- Basic validation on all submissions\n- Server-generated timestamps\n- Rate limiting to prevent spam\n- No personally identifiable information stored\n\n------------------------------------------------------------------------\n\n## ⚠️ Disclaimer\n\nThis project is not affiliated with the Chicago Transit Authority.\\\nAll data is user-submitted and provided as-is.\n\n------------------------------------------------------------------------\n\n## 🛠️ Planned Improvements\n\n* Add **test coverage**\n* Expand to support additional **report types** (e.g., loud music, cleanliness)\n* Improve **data caching** and **error granularity**\n\nHave an idea or feature request? Open an issue — contributions are welcome!\n\n------------------------------------------------------------------------\n\n## 🧾 License\n\nLicensed under the Apache License 2.0.\\\nCopyright © 2026 Logan Bailey Kulinski.\n\n------------------------------------------------------------------------\n\n*Built with ❤️ by [Logan Kulinski](https://lbku.net)*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flbkulinski%2Fcta-smokers-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flbkulinski%2Fcta-smokers-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flbkulinski%2Fcta-smokers-api/lists"}