{"id":22835428,"url":"https://github.com/dxw/opsgenie-schedule","last_synced_at":"2025-07-30T23:37:57.014Z","repository":{"id":37493287,"uuid":"211869724","full_name":"dxw/opsgenie-schedule","owner":"dxw","description":"A simple gem that fetches the scheduled people working on a given date for any Opsgenie schedule.","archived":false,"fork":false,"pushed_at":"2025-07-18T04:53:40.000Z","size":99,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-07-18T08:20:52.201Z","etag":null,"topics":["delivery-plus","tech-ops"],"latest_commit_sha":null,"homepage":"","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/dxw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","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}},"created_at":"2019-09-30T13:44:31.000Z","updated_at":"2025-07-18T04:53:42.000Z","dependencies_parsed_at":"2023-02-13T00:16:13.111Z","dependency_job_id":"1590ee31-828b-4a99-85cf-9b2dbd10f46d","html_url":"https://github.com/dxw/opsgenie-schedule","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/dxw/opsgenie-schedule","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dxw%2Fopsgenie-schedule","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dxw%2Fopsgenie-schedule/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dxw%2Fopsgenie-schedule/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dxw%2Fopsgenie-schedule/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dxw","download_url":"https://codeload.github.com/dxw/opsgenie-schedule/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dxw%2Fopsgenie-schedule/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267475776,"owners_count":24093351,"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","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"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":["delivery-plus","tech-ops"],"created_at":"2024-12-12T22:09:52.776Z","updated_at":"2025-07-30T23:37:56.991Z","avatar_url":"https://github.com/dxw.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://github.com/dxw/opsgenie-schedule/workflows/Build/badge.svg)](https://github.com/dxw/opsgenie-schedule/actions)\n\n# Opsgenie Schedule\n\nA simple gem that fetches the scheduled people working on a given date for any Opsgenie schedule.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\n  gem 'opsgenie-schedule'\n```\n\nAnd then execute:\n\n```bash\n$ bundle\n```\n\nOr install it yourself as:\n\n```bash\n$ gem install opsgenie-schedule\n```\n\n## Usage\n\nRequire and initialize the gem like so:\n\n```ruby\nrequire 'opsgenie'\n\nOpsgenie.configure(api_key: \"YOUR_OPSGENIE_API_KEY\")\n```\n\nAnd fetch a schedule by its name:\n\n```ruby\nschedule = Opsgenie::Schedule.find_by_name(\"schedule_name\")\n```\n\nOr its ID\n\n```ruby\nschedule = Opsgenie::Schedule.find_by_id(\"some_uuid\")\n```\n\nYou can then fetch the people scheduled for today like so:\n\n```ruby\nschedule.on_calls\n#=\u003e [\n#     \u003cOpsgenie::User @full_name=\"Someone\", @id=1234, @username=\"someone@example.com\"\u003e,\n#     \u003cOpsgenie::User @full_name=\"Someone Else\", @id=1236, @username=\"somesomeone-elseone@example.com\"\u003e\n#]\n```\n\nOr a given date time like so:\n\n```ruby\ndate = DateTime.parse(\"2019-01-01T10:00:00\")\nschedule.on_calls(date)\n#=\u003e [\n#     \u003cOpsgenie::User @full_name=\"Someone\", @id=1234, @username=\"someone@example.com\"\u003e,\n#     \u003cOpsgenie::User @full_name=\"Someone Else\", @id=1236, @username=\"somesomeone-elseone@example.com\"\u003e\n#]\n```\n\nYou can also fetch a timeline for a schedule:\n\n```ruby\nschedule.timeline\n```\n\nOr a specific rotation:\n\n```ruby\nschedule.rotation[0].timeline\n```\n\nYou can also specify where you want a timeline to start from:\n\n```ruby\nschedule.timeline(date: Date.parse(\"2019-01-01\"))\n# =\u003e [#\u003cOpsgenie::TimelineRotation:0x00007f9b2f974cb8\n#   @id=\"69e7d46d-538e-4fca-95d0-5c316a54424e\",\n#   @name=\"On Call Phone\",\n#   @periods=\n#    [#\u003cOpsgenie::TimelinePeriod:0x00007f9b2f974c40\n#      @end_date=#\u003cDateTime: 2019-12-05T11:55:29+00:00 ((2458823j,42929s,816000000n),+0s,2299161j)\u003e,\n#      @start_date=#\u003cDateTime: 2019-12-02T00:00:00+00:00 ((2458820j,0s,0n),+0s,2299161j)\u003e,\n#      @user=\n#       #\u003cOpsgenie::User:0x00007f9b2f329520\n#        @full_name=\"On Call Phone\",\n#        @id=\"19e39115-07d5-4924-8295-332a66dd1569\",\n#        @username=\"systems@dxw.com\"\u003e\u003e,\n#     ...]\n#    ],\n#    ...\n#   ]\n#  \u003e\n```\n\nAs well as the interval you want to see a timeline for:\n\n```ruby\n# `interval_unit` can be one of `:days`, `:weeks` or `:months`\nschedule.timeline(interval: 1, interval_unit: :months)\n#=\u003e [...]\n```\n\nThese options also work for a rotation's timeline too:\n\n```ruby\nschedule.rotation[0].timeline(\n  date: Date.parse(\"2019-01-01\"),\n  interval: 1,\n  interval_unit: :months\n)\n#=\u003e \u003cOpsgenie::TimelineRotation:0x00007f9b2f974cb8\u003e\n```\n\n## Development\n\nAfter checking out the repo, run `bundle install` to install dependencies. Then, run `rake spec` to run the tests.\n\nTo install this gem onto your local machine, run `bundle exec rake install`.\n\nTo release a new version, update the version number in `opsgenie-schedule.gemspec`, commit the change and then create a git tag for that version in the\nformat `x.x.x` (where x is each version number). Github Actions will then automatically push the latest version to Rubygems.\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/dxw/opsgenie-schedule. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Code of Conduct\n\nEveryone interacting in the MarketplaceOpportunityScraper project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/dxw/opsgenie-schedule/blob/master/CODE_OF_CONDUCT.md).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdxw%2Fopsgenie-schedule","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdxw%2Fopsgenie-schedule","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdxw%2Fopsgenie-schedule/lists"}