{"id":20279147,"url":"https://github.com/peterhellberg/nobel","last_synced_at":"2025-03-04T01:49:52.850Z","repository":{"id":6663540,"uuid":"7908171","full_name":"peterhellberg/nobel","owner":"peterhellberg","description":"Ruby client for the Nobel Prize API","archived":false,"fork":false,"pushed_at":"2013-09-23T16:53:44.000Z","size":140,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-15T06:02:43.272Z","etag":null,"topics":[],"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/peterhellberg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-01-30T05:05:00.000Z","updated_at":"2021-02-09T12:53:18.000Z","dependencies_parsed_at":"2022-08-28T01:41:32.320Z","dependency_job_id":null,"html_url":"https://github.com/peterhellberg/nobel","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterhellberg%2Fnobel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterhellberg%2Fnobel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterhellberg%2Fnobel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterhellberg%2Fnobel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peterhellberg","download_url":"https://codeload.github.com/peterhellberg/nobel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241768278,"owners_count":20017129,"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-14T13:28:31.044Z","updated_at":"2025-03-04T01:49:52.827Z","avatar_url":"https://github.com/peterhellberg.png","language":"Ruby","readme":"# Nobel\n\nA small API client for the Nobel Prize API.\n\nYou can find out more on the official [Developer Zone](http://www.nobelprize.org/nobel_organizations/nobelmedia/nobelprize_org/developer/)\n\nThere is also an API Console on [API HQ](http://console.apihq.com/nobel-prize-api)\n\n[![Build Status](https://travis-ci.org/peterhellberg/nobel.png?branch=master)](https://travis-ci.org/peterhellberg/nobel)\n\n## Dependencies\n\nNope.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n    gem 'nobel'\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install nobel\n\n## Usage\n\nIt is probably a good idea to take a look in `specs`\n\n### Prize\n\n```ruby\n# All Nobel Prizes in 2010\nNobel::Prize.all year: 2010\n\n# All Peace Prizes \nNobel::Prize.all category: 'peace'\n```\n\n### Laureate\n\nThe laureate data contains their prizes (and affiliations)\n\n```ruby\n# Find a Nobel Laureate by ID\nnelly = Nobel::Laureate.find 640\n\n# Show the categories Nelly won\nnelly.categories #=\u003e [\"literature\"]\n\n# Show the years Nelly won\nnelly.years #=\u003e [1966]\n\n# Find all living female Nobel Laureates\n#  (`query` is an alias to `all`)\nNobel::Laureate.query diedDate: '0000', gender: 'female'\n```\n\n### Country\n\nThe country data only contains the country code and name.\n\n```ruby\n# To return a list of all known countries\nNobel::Country.all\n\n# To find a specific country\nNobel::Country.find 'FR' #=\u003e #\u003cNobel::Country:0x007fda82b78220 @code=\"FR\", @name=\"France\"\u003e\n\n# You can also find by name\nNobel::Country.find 'Germany', :name #=\u003e #\u003cNobel::Country:0x007fda82b90b40 @code=\"DE\", @name=\"Germany\"\u003e\n```\n\n### Configuration\n\nNothing needs to be configured out of the box, but you can change the\n`api_host`, `api_version`, `json_parser`, `http_client` and `debug`\nsettings like this:\n\n```ruby\nNobel.configure do |c|\n  c.api_host    = 'nobel.api'\n  c.api_version = 'v42'\n  c.json_parser = -\u003e(json) { Oj.load(json) }\n  c.http_client = MyOwnHttpClient\n  c.debug       = true\nend\n```\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterhellberg%2Fnobel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeterhellberg%2Fnobel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterhellberg%2Fnobel/lists"}