{"id":17600192,"url":"https://github.com/igneus/calendarium-romanum-remote","last_synced_at":"2025-06-29T03:33:40.562Z","repository":{"id":24432563,"uuid":"101553880","full_name":"igneus/calendarium-romanum-remote","owner":"igneus","description":"remote calendar extension for calendarium-romanum","archived":false,"fork":false,"pushed_at":"2024-09-08T12:29:19.000Z","size":40,"stargazers_count":5,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-01T17:08:14.549Z","etag":null,"topics":["calendar","church","liturgy","ruby"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/igneus.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2017-08-27T13:24:11.000Z","updated_at":"2025-02-16T17:36:04.000Z","dependencies_parsed_at":"2025-03-08T21:31:08.519Z","dependency_job_id":"c49768f7-2ede-491d-a048-8733ff9debff","html_url":"https://github.com/igneus/calendarium-romanum-remote","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/igneus/calendarium-romanum-remote","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igneus%2Fcalendarium-romanum-remote","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igneus%2Fcalendarium-romanum-remote/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igneus%2Fcalendarium-romanum-remote/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igneus%2Fcalendarium-romanum-remote/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/igneus","download_url":"https://codeload.github.com/igneus/calendarium-romanum-remote/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igneus%2Fcalendarium-romanum-remote/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262528247,"owners_count":23324520,"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":["calendar","church","liturgy","ruby"],"created_at":"2024-10-22T11:09:39.834Z","updated_at":"2025-06-29T03:33:40.548Z","avatar_url":"https://github.com/igneus.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# calendarium-romanum-remote\n\n[![Gem Version](https://badge.fury.io/rb/calendarium-romanum-remote.svg)](https://badge.fury.io/rb/calendarium-romanum-remote)\n\nExtends [calendarium-romanum][caro] with a new class\n`CalendariumRomanum::Remote::Calendar`.\nIt is (only exception being the constructor) API-compatible\nwith `CalendariumRomanum::Calendar`, but obtains the data\nfrom a [remote calendar API][calapi] instead of computing them.\n\n## What it is good for\n\nThere are cases when you can't - or don't want to - setup a\n`CalendariumRomanum::Calendar` yourself.\nMaybe you don't have all the necessary data, but there is a calendar\nAPI instance which has them.\nMaybe you always want to have the most accurate and up-to-date data,\nbut you don't want to watch for fixes and updates\nto `calendarium-romanum`, and there is a regularly updated instance\nof calendar API out there.\nIn all these cases it is convenient to use `calendarium-romanum-remote`\ninstead of building a regular `Calendar` in your application.\n\n## Usage\n\nLoad by\n\n```ruby\nrequire 'calendarium-romanum'\nrequire 'calendarium-romanum/remote'\n```\n\nor by a shortcut\n\n```ruby\nrequire 'calendarium-romanum-remote'\n```\n\n```ruby\nCR = CalendariumRomanum\n\n# create by specifying a year and remote calendar URI\ncalendar = CR::Remote::Calendar.new(2016, 'http://calapi.inadiutorium.cz/api/v0/en/calendars/general-la/')\n\n# use the same way as the normal Calendar, get the same return values\nday = calendar.day Date.new(2016, 12, 24)\n```\n\nAs most abstractions, also the one of `Remote::Calendar` is\n[leaky][leaky_abstractions]:\na whole bunch of errors specific to the network communication\ntaking place in the background can occur.\n\n```ruby\nCR = CalendariumRomanum\n\ncalendar = CR::Remote::Calendar.new(2016, 'http://calapi.inadiutorium.cz/api/v0/en/calendars/general-la/')\n\nbegin\n  day = calendar.day Date.new(2016, 12, 24)\nrescue CR::Remote::UnexpectedResponseError\n  # the server responded with some \"unhappy\" HTTP status code\nrescue CR::Remote::InvalidDataError =\u003e err\n  # data returned by the server were not understood\nrescue HTTPI::Error\n  # parent class of lower-level network errors raised by HTTPI -\n  # see its documentation or source for the specific exception\n  # classes\nend\n```\n\n## Important implementation details\n\nUnder the hood [HTTPi][httpi] is used to issue HTTP requests\nand [multi_json][multi_json] for JSON deserialization.\nBoth gems provide uniform public interfaces while allowing\nyou to choose among several implementations.\n`calendarium-romanum-remote` deliberately does not make any\nchoice concerning the implementations and leaves this up to you.\nThere are sensible defaults working out of the box,\nbut it's advisable to check both gems' documentation to see\nwhat options you have and how to make use of them.\n\nThe following example configures `curb` to be used internally\nas HTTP client and `oj` as JSON deserializer.\n\n```ruby\nrequire 'curb'\nrequire 'oj'\nrequire 'calendarium-romanum-remote'\n\nHTTPI.adapter = :curb\nMultiJson.adapter = :oj\n```\n\n## License\n\nfreely choose between GNU/LGPL 3 and MIT\n\n[caro]: https://github.com/igneus/calendarium-romanum\n[calapi]: https://github.com/igneus/church-calendar-api\n[leaky_abstractions]: https://www.joelonsoftware.com/2002/11/11/the-law-of-leaky-abstractions/\n[httpi]: http://httpirb.com\n[multi_json]: https://github.com/intridea/multi_json\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figneus%2Fcalendarium-romanum-remote","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Figneus%2Fcalendarium-romanum-remote","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figneus%2Fcalendarium-romanum-remote/lists"}