Class: CoverMyMeds::Client
- Inherits:
-
Object
- Object
- CoverMyMeds::Client
- Includes:
- ApiRequest, Consumers, Credentials, Drugs, Forms, Indicators, RequestPages, Requests, Tokens
- Defined in:
- lib/cover_my_meds/client.rb
Constant Summary
Constants included from Indicators
Constants included from RequestPages
Constants included from Credentials
CoverMyMeds::Credentials::CURRENT_VERSION
Constants included from Tokens
Constants included from Requests
Constants included from Forms
Constants included from Drugs
Constants included from Consumers
CoverMyMeds::Consumers::CURRENT_VERSION
Constants included from ApiRequest
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#initialize(username, password = nil) {|_self| ... } ⇒ Client
constructor
use the block to set module privided instance variables: “‘ruby Client.new(’mark’) do |client| client.contacts_path = ‘/’ client.contacts_host = ‘contacts-api.dev’ end “‘.
Methods included from Indicators
#post_indicators, #search_indicators
Methods included from HostAndPath
Methods included from RequestPages
Methods included from Credentials
#create_credential, #credentials_path, #delete_credential
Methods included from Tokens
#create_access_token, #revoke_access_token?, #tokens_path
Methods included from Requests
#archive_request, #create_request, #get_request, #get_requests, #request_data, #send_to_plan_request
Methods included from Forms
#form_search, #form_search_by_plan, #get_form
Methods included from Drugs
Methods included from Consumers
Methods included from ApiRequest
#parse_response, #request, #url
Constructor Details
#initialize(username, password = nil) {|_self| ... } ⇒ Client
use the block to set module privided instance variables: “‘ruby Client.new(’mark’) do |client|
client.contacts_path = '/'
client.contacts_host = 'http://contacts-api.dev'
end “‘
Defaults are to proudction to make it easy for external gem consumers.
32 33 34 35 36 |
# File 'lib/cover_my_meds/client.rb', line 32 def initialize(username, password=nil) @username = username @password = password yield(self) if block_given? end |
Instance Attribute Details
#default_host ⇒ Object
39 40 41 |
# File 'lib/cover_my_meds/client.rb', line 39 def default_host @default_host ||= "https://api.covermymeds.com" end |