Class: GdsApi::NeedApi

Inherits:
Base
  • Object
show all
Defined in:
lib/gds_api/need_api.rb

Instance Attribute Summary

Attributes inherited from Base

#options

Instance Method Summary collapse

Methods inherited from Base

#adapter_name, #client, #create_client, #get_list!, #initialize, #url_for_slug

Constructor Details

This class inherits a constructor from GdsApi::Base

Instance Method Details

#create_need(need) ⇒ Object



9
10
11
# File 'lib/gds_api/need_api.rb', line 9

def create_need(need)
  post_json!("#{endpoint}/needs", need)
end

#needsObject



5
6
7
# File 'lib/gds_api/need_api.rb', line 5

def needs
  get_list!("#{endpoint}/needs")
end

#organisationsObject



13
14
15
# File 'lib/gds_api/need_api.rb', line 13

def organisations
  get_json!("#{endpoint}/organisations")["organisations"]
end