steveklabnik/sunlight-congress — pull request #26 by seanknox (2013-04-29 07:40:16+00:00)
Title: Base class to handle common API methods and configuration options

API requests involving filtering (search) and pagination are used across different Sunlight resources. My first attempt to introduce a base class to handle these common methods.

Dependent classes create an instance of ::Base, passing themselves to
::Base, so we can get the calling class. We use calling class to
determine the Sunlight method to hit, like /legislators.

The response is parsed here as well–eventually I'd like to make this
smarter and DRY up the response parsing throughout the codebase.