# Rescue Groups Ruby Wrapper

DevFeed: [Rescue Groups Ruby Wrapper](<https://devfeed.tech/articles/rescue-groups-ruby-wrapper-21041.md>)

Original publisher: [Read original article](<https://jakeyesbeck.com/2015/09/13/rescue-groups/>)

Published: 2015-09-13T12:00:00Z

Content type: tutorial

Language: en

Sources: [Jake Yesbeck](<https://devfeed.tech/sources/jake-yesbeck.md>)

Topics: [Ruby](<https://devfeed.tech/topics/ruby.md>), [API](<https://devfeed.tech/topics/api.md>), [Library](<https://devfeed.tech/topics/library.md>), [API keys](<https://devfeed.tech/topics/api-keys.md>), [configuration](<https://devfeed.tech/topics/configuration.md>), [Rails](<https://devfeed.tech/topics/rails.md>)

Tags: [activerecord](<https://devfeed.tech/tags/activerecord.md>), [api](<https://devfeed.tech/tags/api.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [install](<https://devfeed.tech/tags/install.md>), [library](<https://devfeed.tech/tags/library.md>), [rails](<https://devfeed.tech/tags/rails.md>), [ruby](<https://devfeed.tech/tags/ruby.md>)

## AI overview

A tutorial for the rescue_groups Ruby gem, a wrapper around the RescueGroups.org API for discovering pet-related records. It explains obtaining an API key, adding the gem to a Gemfile, configuring it, and using search methods and Rails-style relationships.

## Source excerpt

People need companions. We are a social species that enjoys surrounding itself with family and friends. But sometimes, and maybe more often than just sometimes, people crave companionship from something that cannot talk back. This is probably one of the reasons so many people like pets. A pet cannot disagree with you or say judgmental remarks as you fill up that wine glass for a fourth time. No, a good pet will simply exist near you, occasionally asking for pets and food. Pets can be obtained from breeders for huge stacks of cash, or they can be adopted for significantly cheaper. The Adoption Option About 2.7 million animals are euthanized each year in animal shelters across the United States. That is some sad stuff right there. These animals could be hanging out with you at your house, clawing up the couch or barking at nothing. Does that not sound like just the best time? If only there was a Ruby library that some super awesome Software Artisans could use to make discoverable pet data a reality. Well now, there is! Over the past few months, as part of the Year of Commits initiative, I have built a wrapper for the RescueGroups.org API. 0. Sign up for an API key The RescueGroups API is free to use, but requires signing up for an API key. To do that, fill out this form and they will email you an API key for you to use. 1. Install the rescue_groups Gem To install the gem, simply add rescue_groups to a ruby project's Gemfile: Gemfile source 'rubygems' gem 'rescue_groups' Then in an initializer or at the beginning of the execution flow for using the library, add your new fancy API key to the configuration. RescueGroups.configuration do |config| config.apikey = 'your api key' end 2. Use the Gem! After the gem is installed, some handy dandy search functionality is right at your fingertips. Call me biased but I rather like the ActiveRecord find and where API. In fact, I like it so much that the rescue_groups gem implemented its own version of both. Searching If an ID is kn