Class: NgrokAPI::Services::EndpointCompressionModuleClient
- Inherits:
-
Object
- Object
- NgrokAPI::Services::EndpointCompressionModuleClient
- Defined in:
- lib/ngrokapi/services/endpoint_compression_module_client.rb
Overview
Constant Summary collapse
- PATH =
The API path for the requests
'/endpoint_configurations/%{id}/compression'
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::EndpointCompression
- #get!(id: "") ⇒ NgrokAPI::Models::EndpointCompression
-
#initialize(client:) ⇒ EndpointCompressionModuleClient
constructor
A new instance of EndpointCompressionModuleClient.
- #replace(id: "", a_module: nil) ⇒ NgrokAPI::Models::EndpointCompression
- #replace!(id: "", a_module: nil) ⇒ NgrokAPI::Models::EndpointCompression
Constructor Details
#initialize(client:) ⇒ EndpointCompressionModuleClient
Returns a new instance of EndpointCompressionModuleClient.
13 14 15 |
# File 'lib/ngrokapi/services/endpoint_compression_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_compression_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_compression_module_client.rb', line 96 def delete( id: "" ) path = '/endpoint_configurations/%{id}/compression' 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_compression_module_client.rb', line 111 def delete!( id: "" ) path = '/endpoint_configurations/%{id}/compression' replacements = { id: id, } @client.delete(path % replacements, danger: true) end |
#get(id: "") ⇒ NgrokAPI::Models::EndpointCompression
62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/ngrokapi/services/endpoint_compression_module_client.rb', line 62 def get( id: "" ) path = '/endpoint_configurations/%{id}/compression' replacements = { id: id, } data = {} result = @client.get(path % replacements, data: data) NgrokAPI::Models::EndpointCompression.new(client: self, result: result) end |
#get!(id: "") ⇒ NgrokAPI::Models::EndpointCompression
79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/ngrokapi/services/endpoint_compression_module_client.rb', line 79 def get!( id: "" ) path = '/endpoint_configurations/%{id}/compression' replacements = { id: id, } data = {} result = @client.get(path % replacements, data: data, danger: true) NgrokAPI::Models::EndpointCompression.new(client: self, result: result) end |
#replace(id: "", a_module: nil) ⇒ NgrokAPI::Models::EndpointCompression
23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/ngrokapi/services/endpoint_compression_module_client.rb', line 23 def replace( id: "", a_module: nil ) path = '/endpoint_configurations/%{id}/compression' replacements = { id: id, } data = {} data[:module] = a_module if a_module result = @client.put(path % replacements, data: data) NgrokAPI::Models::EndpointCompression.new(client: self, result: result) end |
#replace!(id: "", a_module: nil) ⇒ NgrokAPI::Models::EndpointCompression
43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/ngrokapi/services/endpoint_compression_module_client.rb', line 43 def replace!( id: "", a_module: nil ) path = '/endpoint_configurations/%{id}/compression' replacements = { id: id, } data = {} data[:module] = a_module if a_module result = @client.put(path % replacements, data: data, danger: true) NgrokAPI::Models::EndpointCompression.new(client: self, result: result) end |