{"id":15407086,"url":"https://github.com/ltfschoen/opendata-api","last_synced_at":"2026-04-28T20:32:38.398Z","repository":{"id":56886815,"uuid":"115100305","full_name":"ltfschoen/opendata-api","owner":"ltfschoen","description":"Ruby Gem wrapper for Transport for NSW (TfNSW) Open Data APIs","archived":false,"fork":false,"pushed_at":"2017-12-22T10:48:51.000Z","size":5,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-11-08T04:17:34.424Z","etag":null,"topics":["curl","dotenv","gem","https","net-http","nsw-government","opendata-api","ruby","rubygems","transport"],"latest_commit_sha":null,"homepage":"https://rubygems.org/gems/opendata-api","language":"Ruby","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/ltfschoen.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":"2017-12-22T09:32:22.000Z","updated_at":"2017-12-22T10:55:38.000Z","dependencies_parsed_at":"2022-08-21T00:20:47.837Z","dependency_job_id":null,"html_url":"https://github.com/ltfschoen/opendata-api","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ltfschoen/opendata-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ltfschoen%2Fopendata-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ltfschoen%2Fopendata-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ltfschoen%2Fopendata-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ltfschoen%2Fopendata-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ltfschoen","download_url":"https://codeload.github.com/ltfschoen/opendata-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ltfschoen%2Fopendata-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32398557,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T19:38:08.556Z","status":"ssl_error","status_checked_at":"2026-04-28T19:37:55.688Z","response_time":56,"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":["curl","dotenv","gem","https","net-http","nsw-government","opendata-api","ruby","rubygems","transport"],"created_at":"2024-10-01T16:27:01.191Z","updated_at":"2026-04-28T20:32:38.382Z","avatar_url":"https://github.com/ltfschoen.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenData API\n\n[![Gem Version](https://badge.fury.io/rb/opendata-api.svg)](https://badge.fury.io/rb/opendata-api)\n\n* Ruby Gem wrapper for [Transport for NSW Open Data APIs](https://opendata.transport.nsw.gov.au) that opens a HTTP(S) session for multiple configured requests. Currently supported APIs:\n  * Traffic Volume Counts API\n  * Trip Planner API\n\n## Installation\n\n* Install Gem\n  ```bash\n  $ gem install opendata-api\n  $ bundle install\n  ```\n\n* Follow [User Guide of OpenData API](https://opendata.transport.nsw.gov.au/user-guide) to:\n    * Register with OpenData API\n    * Create App\n    * Select APIs Supported by the Gem\n    * Obtain associated API Keys\n    * Add API Keys to .env file (i.e. `OPENDATA_API_KEY=\u003cINSERT_API_KEY\u003e`)\n    * Access the API Key in Ruby app with `ENV['OPENDATA_API_KEY']`\n\n* Usage in Ruby project or IRB\n  ```ruby\n  require 'opendata-api'\n  require 'json'\n  require 'dotenv'\n  API_KEY = ENV['OPENDATA_API_KEY']\n  OpenDataAPI.init(API_KEY)\n  args = [\n    {\n      api_name: 'traffic_volume_counts',\n      format: 'geojson',\n      table: 'road_traffic_counts_station_reference',\n      limit: '50'\n    },\n    {\n      api_name: 'trip_planner',\n      format: 'rapidJSON',\n      coord_lat: '-33.8688',\n      coord_long: '151.2093',\n      coord_radius: '1000'\n    }\n  ]\n  response = OpenDataAPI.run(args)\n  puts JSON.pretty_generate(JSON.parse(response[:traffic_volume_counts]))\n  puts JSON.pretty_generate(JSON.parse(response[:trip_planner]))\n  ```\n\n## Contributors\n\nContributions are welcome. Particularly updating the configuration to support other OpenData APIs.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fltfschoen%2Fopendata-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fltfschoen%2Fopendata-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fltfschoen%2Fopendata-api/lists"}