Class: HookSniff::Routing
- Inherits:
-
Object
- Object
- HookSniff::Routing
- Defined in:
- lib/hooksniff/api/routing.rb
Instance Method Summary collapse
- #get(endpoint_id) ⇒ Object
- #get_health(endpoint_id) ⇒ Object
-
#initialize(client) ⇒ Routing
constructor
A new instance of Routing.
- #update(endpoint_id, attrs) ⇒ Object
Constructor Details
#initialize(client) ⇒ Routing
Returns a new instance of Routing.
5 6 7 |
# File 'lib/hooksniff/api/routing.rb', line 5 def initialize(client) @client = client end |
Instance Method Details
#get(endpoint_id) ⇒ Object
9 10 11 |
# File 'lib/hooksniff/api/routing.rb', line 9 def get(endpoint_id) @client.execute_request("GET", "/v1/routing/#{endpoint_id}/routing") end |
#get_health(endpoint_id) ⇒ Object
17 18 19 |
# File 'lib/hooksniff/api/routing.rb', line 17 def get_health(endpoint_id) @client.execute_request("GET", "/v1/routing/#{endpoint_id}/health") end |
#update(endpoint_id, attrs) ⇒ Object
13 14 15 |
# File 'lib/hooksniff/api/routing.rb', line 13 def update(endpoint_id, attrs) @client.execute_request("PUT", "/v1/routing/#{endpoint_id}/routing", body: attrs) end |