{"id":20290652,"url":"https://github.com/gocardless/open-charities","last_synced_at":"2026-05-12T19:11:27.736Z","repository":{"id":5647676,"uuid":"6856442","full_name":"gocardless/open-charities","owner":"gocardless","description":"A Ruby library for querying the OpenCharities database","archived":false,"fork":false,"pushed_at":"2013-01-30T11:52:46.000Z","size":191,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":115,"default_branch":"master","last_synced_at":"2024-04-24T13:36:43.610Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/gocardless.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":"2012-11-25T22:10:34.000Z","updated_at":"2024-04-24T13:36:43.611Z","dependencies_parsed_at":"2022-08-21T00:20:26.921Z","dependency_job_id":null,"html_url":"https://github.com/gocardless/open-charities","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/gocardless%2Fopen-charities","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gocardless%2Fopen-charities/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gocardless%2Fopen-charities/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gocardless%2Fopen-charities/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gocardless","download_url":"https://codeload.github.com/gocardless/open-charities/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241787488,"owners_count":20020099,"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":[],"created_at":"2024-11-14T15:08:37.256Z","updated_at":"2026-05-12T19:11:27.695Z","avatar_url":"https://github.com/gocardless.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Open Charities\n\nA simple library for querying http://opencharities.org/ database.\n\n## Installation\n\nTo install as a standalone\n```sh\n$ gem install open-charities\n```\nor as a dependency in a Gemfile\n```ruby\ngem \"open-charities\", \"~\u003e 0.2.0\", require: 'open_charities'\n```\n\n## Usage\n\n```ruby\ncharity = OpenCharities.lookup(\"1149855\")\n=\u003e #\u003cOpenCharities::Response:0x00000001738d30 @attributes={\"address\"...\u003e\n\ncharity['title']\n=\u003e \"VETERAN'S HEADQUARTERS\"\n\ncharity.title\n=\u003e \"VETERAN'S HEADQUARTERS\"\n\ncharity.charity_number\n=\u003e \"1149855\"\n\ncharity.address\n=\u003e {\"region\"=\u003enil, \"raw_address\"=\u003enil, \"created_at\"=\u003e\"2012-11-22T05:00:54+00:00\"...}\n```\nAs can be seen from this example, some of the attributes are exposed as instance\nmethods. More specifically, the methods that are exposed correspond to the\ntop-level keys in the Hash containing information about the charity.\nAs in the above example, the `address` attribute returns another Hash.\n\n## Caching\n\nRequests can be cached by configuring the gem to use an external cache (for example,\nthe Rails cache).\n\n```ruby\n# file config/initializers/open_charities.rb\n\n# swap in your own cache here\nOpenCharities.cache = Rails.cache\n\n# Optional\nOpenCharities.cache_args = { expires_in: 10.minutes }\n```\n\n## Testing\n\nTo run the tests, issue `rspec spec` on the command-line.\n\n### Available testing data\n\nThere is testing data available `spec/data/veteransheadquarters.json`. The same\ndata is used by the tests in `spec/`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgocardless%2Fopen-charities","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgocardless%2Fopen-charities","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgocardless%2Fopen-charities/lists"}