Class: NgrokAPI::Client
- Inherits:
-
Object
- Object
- NgrokAPI::Client
- Defined in:
- lib/ngrokapi/client.rb
Overview
Low-level api client for communicating with Ngrok's HTTP API. Use this object to instantiate your clients.
Instance Method Summary collapse
-
#api_keys ⇒ NgrokAPI::Services::ApiKeysClient
Creates and returns an instance of a NgrokAPI::Services::ApiKeysClient.
-
#endpoint_configurations ⇒ NgrokAPI::Services::EndpointConfigurationsClient
Creates and returns an instance of a NgrokAPI::Services::EndpointConfigurationsClient.
-
#initialize(api_key:, base_url: 'https://api.ngrok.com') ⇒ Client
constructor
A new instance of Client.
-
#reserved_domains ⇒ NgrokAPI::Services::ReservedDomainsClient
Creates and returns an instance of a NgrokAPI::Services::ReservedDomainsClient.
-
#tls_certificates ⇒ NgrokAPI::Services::TlsCertificatesClient
Creates and returns an instance of a NgrokAPI::Services::TlsCertificatesClient.
Constructor Details
#initialize(api_key:, base_url: 'https://api.ngrok.com') ⇒ Client
Returns a new instance of Client.
8 9 10 11 12 13 |
# File 'lib/ngrokapi/client.rb', line 8 def initialize( api_key:, base_url: 'https://api.ngrok.com' ) @client = NgrokAPI::HttpClient.new(api_key: api_key, base_url: base_url) end |
Instance Method Details
#api_keys ⇒ NgrokAPI::Services::ApiKeysClient
Creates and returns an instance of a NgrokAPI::Services::ApiKeysClient
19 20 21 |
# File 'lib/ngrokapi/client.rb', line 19 def api_keys @_api_keys ||= NgrokAPI::Services::ApiKeysClient.new(client: @client) end |
#endpoint_configurations ⇒ NgrokAPI::Services::EndpointConfigurationsClient
Creates and returns an instance of a NgrokAPI::Services::EndpointConfigurationsClient
27 28 29 30 31 |
# File 'lib/ngrokapi/client.rb', line 27 def endpoint_configurations @_endpoint_configurations ||= NgrokAPI::Services::EndpointConfigurationsClient.new( client: @client ) end |
#reserved_domains ⇒ NgrokAPI::Services::ReservedDomainsClient
Creates and returns an instance of a NgrokAPI::Services::ReservedDomainsClient
37 38 39 |
# File 'lib/ngrokapi/client.rb', line 37 def reserved_domains @_reserved_domains ||= NgrokAPI::Services::ReservedDomainsClient.new(client: @client) end |
#tls_certificates ⇒ NgrokAPI::Services::TlsCertificatesClient
Creates and returns an instance of a NgrokAPI::Services::TlsCertificatesClient
45 46 47 |
# File 'lib/ngrokapi/client.rb', line 45 def tls_certificates @_tls_certificates ||= NgrokAPI::Services::TlsCertificatesClient.new(client: @client) end |