Class: DonorsChoose::Project

Inherits:
Object
  • Object
show all
Defined in:
lib/donors_choose/project.rb

Overview

This API allows us to find information about DonorsChoose projects, so a Project is the main class of the gem.

Class Method Summary collapse

Class Method Details

.by_zip(zipcode) ⇒ Object

This method allows you to look up all projects by a zip code.


11
12
13
# File 'lib/donors_choose/project.rb', line 11

def self.by_zip(zipcode)
  DonorsChoose::Request.get(:zip => zipcode)
end

.near_me(latitude, longitude) ⇒ Object

This method finds all projects near a given latitude and longitude.


6
7
8
# File 'lib/donors_choose/project.rb', line 6

def self.near_me(latitude, longitude)
  DonorsChoose::Request.get(:centerLat => latitude, :centerLong => longitude)
end