class FirstGiving::Search
Public Class Methods
new()
click to toggle source
# File lib/firstgiving/search.rb, line 13 def initialize @api_endpoint = SEARCH_ENDPOINT end
Public Instance Methods
headers()
click to toggle source
# File lib/firstgiving/search.rb, line 17 def headers { 'Accept' => 'application/json' } end
parse(body)
click to toggle source
# File lib/firstgiving/search.rb, line 26 def parse(body) response = JSON.parse(body) response['payload'] end
query(params)
click to toggle source
# File lib/firstgiving/search.rb, line 21 def query(params) response = get_call(@api_endpoint, Actions::LIST_ORGANIZATION, params, headers) parse(response.body) end