module Orghunter
Constants
- VERSION
Attributes
configuration[RW]
Public Class Methods
all_categories()
click to toggle source
# File lib/orghunter.rb, line 25 def self.all_categories query_uri = URI::encode("http://data.orghunter.com/v1/charitysearch?user_key=#{Orghunter.configuration.api_key}") response = Net::HTTP.get_response(URI(query_uri)) categories_json = JSON.parse(response.body)['data'] results = categories_json.map{|category_hash| Category.new(category_hash)} end
configure() { |configuration| ... }
click to toggle source
# File lib/orghunter.rb, line 21 def self.configure yield(configuration) end
reset()
click to toggle source
# File lib/orghunter.rb, line 17 def self.reset @configuration = Configuration.new end