Class: InfluxDB2::API::Client
- Inherits:
-
Object
- Object
- InfluxDB2::API::Client
- Defined in:
- lib/influxdb2/apis/api.rb
Overview
The client is the entry point to management HTTP API defined in github.com/influxdata/influxdb/blob/master/http/swagger.yml.
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_authorizations_api ⇒ InfluxDB2::API::AuthorizationsApi
Create a new instance of AuthorizationsApi.
-
#create_buckets_api ⇒ InfluxDB2::API::BucketsApi
Create a new instance of BucketsApi.
-
#create_labels_api ⇒ InfluxDB2::API::LabelsApi
Create a new instance of LabelsApi.
-
#create_organizations_api ⇒ InfluxDB2::API::OrganizationsApi
Create a new instance of OrganizationsApi.
-
#create_tasks_api ⇒ InfluxDB2::API::TasksApi
Create a new instance of TasksApi.
-
#create_users_api ⇒ InfluxDB2::API::UsersApi
Create a new instance of UsersApi.
-
#initialize(client) ⇒ Client
constructor
Initialize client that providing a support for managements APIs.
Constructor Details
#initialize(client) ⇒ Client
Initialize client that providing a support for managements APIs.
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/influxdb2/apis/api.rb', line 34 def initialize(client) configuration = Configuration.new uri = URI.parse(client.[:url]) # base URL configuration.scheme = uri.scheme configuration.host = uri.to_s # SSL configuration.verify_ssl = client.[:use_ssl].nil? ? true : client.[:use_ssl] # Token configuration.api_key_prefix['api_key'] = 'Token' configuration.api_key['api_key'] = client.[:token] # Debugging configuration.debugging = client.[:debugging] configuration.logger = client.[:logger] @api_client = ApiClient.new(configuration) # User Agent @api_client.user_agent = "influxdb-client-ruby/#{InfluxDB2::VERSION}" end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
25 26 27 |
# File 'lib/influxdb2/apis/api.rb', line 25 def api_client @api_client end |
Instance Method Details
#create_authorizations_api ⇒ InfluxDB2::API::AuthorizationsApi
Create a new instance of AuthorizationsApi.
58 59 60 |
# File 'lib/influxdb2/apis/api.rb', line 58 def InfluxDB2::API::AuthorizationsApi.new(@api_client) end |
#create_buckets_api ⇒ InfluxDB2::API::BucketsApi
Create a new instance of BucketsApi.
65 66 67 |
# File 'lib/influxdb2/apis/api.rb', line 65 def create_buckets_api InfluxDB2::API::BucketsApi.new(@api_client) end |
#create_labels_api ⇒ InfluxDB2::API::LabelsApi
Create a new instance of LabelsApi.
72 73 74 |
# File 'lib/influxdb2/apis/api.rb', line 72 def create_labels_api InfluxDB2::API::LabelsApi.new(@api_client) end |
#create_organizations_api ⇒ InfluxDB2::API::OrganizationsApi
Create a new instance of OrganizationsApi.
79 80 81 |
# File 'lib/influxdb2/apis/api.rb', line 79 def create_organizations_api InfluxDB2::API::OrganizationsApi.new(@api_client) end |
#create_tasks_api ⇒ InfluxDB2::API::TasksApi
Create a new instance of TasksApi.
93 94 95 |
# File 'lib/influxdb2/apis/api.rb', line 93 def create_tasks_api InfluxDB2::API::TasksApi.new(@api_client) end |
#create_users_api ⇒ InfluxDB2::API::UsersApi
Create a new instance of UsersApi.
86 87 88 |
# File 'lib/influxdb2/apis/api.rb', line 86 def create_users_api InfluxDB2::API::UsersApi.new(@api_client) end |