Class: Volunteermatch::Client
- Inherits:
-
Object
- Object
- Volunteermatch::Client
- Includes:
- API::HelloWorld, API::KeyStatus, API::Metadata, API::SearchOpportunities, API::SearchOrganizations, API::ServiceStatus
- Defined in:
- lib/volunteermatch/client.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#api_username ⇒ Object
Returns the value of attribute api_username.
Instance Method Summary collapse
-
#initialize(api_username, api_key) ⇒ Client
constructor
A new instance of Client.
Methods included from API::SearchOpportunities
Methods included from API::SearchOrganizations
Methods included from API::ServiceStatus
Methods included from API::Metadata
Methods included from API::KeyStatus
Methods included from API::HelloWorld
Constructor Details
#initialize(api_username, api_key) ⇒ Client
Returns a new instance of Client.
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_key ⇒ Object
Returns the value of attribute api_key.
17 18 19 |
# File 'lib/volunteermatch/client.rb', line 17 def api_key @api_key end |
#api_username ⇒ Object
Returns the value of attribute api_username.
17 18 19 |
# File 'lib/volunteermatch/client.rb', line 17 def api_username @api_username end |