Class: NgrokAPI::Services::EndpointLoggingModuleClient
- Inherits:
-
Object
- Object
- NgrokAPI::Services::EndpointLoggingModuleClient
- Defined in:
- lib/ngrokapi/services/endpoint_logging_module_client.rb
Overview
Constant Summary collapse
- PATH =
The API path for the requests
'/endpoint_configurations/%{id}/logging'
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Instance Method Summary collapse
- #delete(id: "") ⇒ NgrokAPI::Models::Empty
- #delete!(id: "") ⇒ NgrokAPI::Models::Empty
- #get(id: "") ⇒ NgrokAPI::Models::EndpointLogging
- #get!(id: "") ⇒ NgrokAPI::Models::EndpointLogging
-
#initialize(client:) ⇒ EndpointLoggingModuleClient
constructor
A new instance of EndpointLoggingModuleClient.
- #replace(id: "", a_module: nil) ⇒ NgrokAPI::Models::EndpointLogging
- #replace!(id: "", a_module: nil) ⇒ NgrokAPI::Models::EndpointLogging
Constructor Details
#initialize(client:) ⇒ EndpointLoggingModuleClient
Returns a new instance of EndpointLoggingModuleClient.
13 14 15 |
# File 'lib/ngrokapi/services/endpoint_logging_module_client.rb', line 13 def initialize(client:) @client = client end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
11 12 13 |
# File 'lib/ngrokapi/services/endpoint_logging_module_client.rb', line 11 def client @client end |
Instance Method Details
#delete(id: "") ⇒ NgrokAPI::Models::Empty
96 97 98 99 100 101 102 103 104 |
# File 'lib/ngrokapi/services/endpoint_logging_module_client.rb', line 96 def delete( id: "" ) path = '/endpoint_configurations/%{id}/logging' replacements = { id: id, } @client.delete(path % replacements) end |
#delete!(id: "") ⇒ NgrokAPI::Models::Empty
111 112 113 114 115 116 117 118 119 |
# File 'lib/ngrokapi/services/endpoint_logging_module_client.rb', line 111 def delete!( id: "" ) path = '/endpoint_configurations/%{id}/logging' replacements = { id: id, } @client.delete(path % replacements, danger: true) end |
#get(id: "") ⇒ NgrokAPI::Models::EndpointLogging
62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/ngrokapi/services/endpoint_logging_module_client.rb', line 62 def get( id: "" ) path = '/endpoint_configurations/%{id}/logging' replacements = { id: id, } data = {} result = @client.get(path % replacements, data: data) NgrokAPI::Models::EndpointLogging.new(client: self, result: result) end |
#get!(id: "") ⇒ NgrokAPI::Models::EndpointLogging
79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/ngrokapi/services/endpoint_logging_module_client.rb', line 79 def get!( id: "" ) path = '/endpoint_configurations/%{id}/logging' replacements = { id: id, } data = {} result = @client.get(path % replacements, data: data, danger: true) NgrokAPI::Models::EndpointLogging.new(client: self, result: result) end |
#replace(id: "", a_module: nil) ⇒ NgrokAPI::Models::EndpointLogging
23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/ngrokapi/services/endpoint_logging_module_client.rb', line 23 def replace( id: "", a_module: nil ) path = '/endpoint_configurations/%{id}/logging' replacements = { id: id, } data = {} data[:module] = a_module if a_module result = @client.put(path % replacements, data: data) NgrokAPI::Models::EndpointLogging.new(client: self, result: result) end |
#replace!(id: "", a_module: nil) ⇒ NgrokAPI::Models::EndpointLogging
43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/ngrokapi/services/endpoint_logging_module_client.rb', line 43 def replace!( id: "", a_module: nil ) path = '/endpoint_configurations/%{id}/logging' replacements = { id: id, } data = {} data[:module] = a_module if a_module result = @client.put(path % replacements, data: data, danger: true) NgrokAPI::Models::EndpointLogging.new(client: self, result: result) end |