{"id":26769897,"url":"https://github.com/bbuck/random_api","last_synced_at":"2025-03-28T22:46:21.876Z","repository":{"id":24508082,"uuid":"27913754","full_name":"bbuck/random_api","owner":"bbuck","description":"A RandomAPI ruby wrapper.","archived":false,"fork":false,"pushed_at":"2015-01-10T08:48:03.000Z","size":172,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-25T22:22:01.181Z","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/bbuck.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":"2014-12-12T09:24:45.000Z","updated_at":"2015-01-10T08:48:04.000Z","dependencies_parsed_at":"2022-08-21T00:20:36.807Z","dependency_job_id":null,"html_url":"https://github.com/bbuck/random_api","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbuck%2Frandom_api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbuck%2Frandom_api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbuck%2Frandom_api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbuck%2Frandom_api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bbuck","download_url":"https://codeload.github.com/bbuck/random_api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246112648,"owners_count":20725300,"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":"2025-03-28T22:46:21.366Z","updated_at":"2025-03-28T22:46:21.860Z","avatar_url":"https://github.com/bbuck.png","language":"Ruby","readme":"# RandomAPI\n\nInterface with the RandomAPI at https://randomuser.me and provide a ruby wrapper for the responses. Interact with response as a Ruby object with helper methods for fetching all important data.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'random_api'\n```\n\nAnd then execute:\n\n    $ bundle install\n\nOr install it yourself as:\n\n    $ gem install random_api\n\n## Usage\n\nUsing RandomAPI is simple, you can use it anonymously or use your API Key to make requests.\n\n```ruby\n# Create a RandomAPI service with anonymous access to the API\nservice = RandomApi::Service.new\n\n# Fetch a single random user\nuser = service.user\n\n# Fetch a male user\nuser = service.user(gender: \"male\")\n\n# Fetch a list of users\nuser = service.users(10)\n\n# Fetch 10 male users\nuser = service.users(10, gender: \"male\")\n\n# If you have an API Key, pass it to service\nservice = RandomApi::Service.new(api_key)\n\n# Then make requests as per the norm\n```\n\nThe object returned by the call to `RandomApi::Service#user` and `RandomApi::Service#users` is of the type `RandomApi::User`.\n\n```ruby\nuser = service.user\n\nuser.gender # =\u003e \"female\"\nuser.name # =\u003e \"Ms. Lois Williams\"\nuser.title # =\u003e \"Ms.\"\nuser.first_name # =\u003e \"Lois\"\nuser.last_name # =\u003e \"Williams\"\nuser.street # =\u003e \"1969 Elgin St\"\nuser.city # =\u003e \"Frederick\"\nuser.state # =\u003e \"Delaware\"\nuser.zip # =\u003e \"56298\"\nuser.email # =\u003e \"lois.williams50@example.com\"\nuser.username # =\u003e \"heavybutterfly920\"\nuser.password # =\u003e \"enterprise\"\nuser.salt # =\u003e \"\u003eegEn6YsO\"\nuser.md5 # =\u003e \"2dd1894ea9d19bf5479992da95713a3a\",\nuser.sha1 # =\u003e \"ba230bc400723f470b68e9609ab7d0e6cf123b59\",\nuser.sha256 # =\u003e \"f4f52bf8c5ad7fc759d1d4156b25a4c7b3d1e2eec6c92d80e508aa0b7946d4ba\",\nuser.registered # =\u003e \"1288182167\",\nuser.dob # =\u003e \"146582153\",\nuser.phone # =\u003e \"(555)-942-1322\",\nuser.cell # =\u003e \"(178)-341-1520\",\nuser.ssn # =\u003e \"137-37-8866\",\nuser.large_picture # =\u003e \"http://api.randomuser.me/portraits/women/55.jpg\",\nuser.medium_picture # =\u003e \"http://api.randomuser.me/portraits/med/women/55.jpg\",\nuser.thumbnail # =\u003e \"http://api.randomuser.me/portraits/thumb/women/55.jpg\",\nuser.api_version # =\u003e \"0.4.1\"\nuser.seed # =\u003e \"graywolf\"\n```\n\n## Contributing\n\n1. Fork it ( https://github.com/[my-github-username]/random_api/fork )\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 a new Pull Request\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbuck%2Frandom_api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbbuck%2Frandom_api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbuck%2Frandom_api/lists"}