Class: KnuVerse::Knufactor::SimpleAPIClient
- Inherits:
-
APIClientBase
- Object
- APIClientBase
- KnuVerse::Knufactor::SimpleAPIClient
- Defined in:
- lib/knuverse/knufactor/simple_api_client.rb
Overview
The Simple API Client class
Instance Attribute Summary
Attributes inherited from APIClientBase
#account, #apikey, #base_uri, #secret, #server
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ SimpleAPIClient
constructor
A new instance of SimpleAPIClient.
Methods inherited from APIClientBase
#about_service, #api_uri, #authenticated?, #configured?, #get, #json_headers, #patch, #post, #put, #refresh_auth, #refresh_auth_bearer
Methods included from Helpers::APIClient
Methods included from Validations::APIClient
#validate_creds, #validate_opts, #validate_server
Constructor Details
#initialize(opts = {}) ⇒ SimpleAPIClient
Returns a new instance of SimpleAPIClient.
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/knuverse/knufactor/simple_api_client.rb', line 5 def initialize(opts = {}) # validations validate_opts(opts) # Set up the client's state @server = opts[:server] || 'https://cloud.knuverse.com' @apikey = opts[:apikey] @secret = opts[:secret] @base_uri = opts[:base_uri] || '/api/v1/' @last_auth = nil @auth_token = nil @configured = true end |