Class: Volunteermatch::Client

Inherits:
Object
  • Object
show all
Includes:
API::HelloWorld, API::KeyStatus, API::Metadata, API::SearchOpportunities, API::SearchOrganizations, API::ServiceStatus
Defined in:
lib/volunteermatch/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from API::SearchOpportunities

#search_opportunities

Methods included from API::SearchOrganizations

#search_organizations

Methods included from API::ServiceStatus

#service_status

Methods included from API::Metadata

#metadata

Methods included from API::KeyStatus

#key_status

Methods included from API::HelloWorld

#test

Constructor Details

#initialize(api_username, api_key) ⇒ Client

Returns a new instance of Client.

Raises:

  • (ArgumentError)


26
27
28
29
30
# File 'lib/volunteermatch/client.rb', line 26

def initialize(api_username, api_key)
  raise ArgumentError, 'username and key need to be defined' if api_username.nil? || api_username.empty? || api_key.nil? || api_key.empty?
  @api_username   = api_username
  @api_key        = api_key
end

Instance Attribute Details

#api_keyObject

Returns the value of attribute api_key.



17
18
19
# File 'lib/volunteermatch/client.rb', line 17

def api_key
  @api_key
end

#api_usernameObject

Returns the value of attribute api_username.



17
18
19
# File 'lib/volunteermatch/client.rb', line 17

def api_username
  @api_username
end