Module: HoverflyAPI
Instance Method Summary collapse
- #clear_cached_data ⇒ Object
- #get_cached_data ⇒ Object
- #get_config_info ⇒ Object
- #get_current_destination ⇒ Object
- #get_current_middleware ⇒ Object
- #get_current_mode ⇒ Object
- #get_current_simulation_schema ⇒ Object
- #get_current_simulations ⇒ Object
- #get_logs ⇒ Object
- #get_upstream_proxy ⇒ Object
- #get_usage ⇒ Object
- #get_version ⇒ Object
- #update_destination(destination) ⇒ Object
- #update_middleware(middleware_request) ⇒ Object
- #update_mode(mode) ⇒ Object
- #update_simulations(simulation) ⇒ Object
Instance Method Details
#clear_cached_data ⇒ Object
60 61 62 |
# File 'lib/endpoints.rb', line 60 def clear_cached_data HoverflyAPI.delete('/api/v2/cache').response.body end |
#get_cached_data ⇒ Object
56 57 58 |
# File 'lib/endpoints.rb', line 56 def get_cached_data HoverflyAPI.get('/api/v2/cache').response.body end |
#get_config_info ⇒ Object
16 17 18 |
# File 'lib/endpoints.rb', line 16 def get_config_info HoverflyAPI.get('/api/v2/hoverfly').response.body end |
#get_current_destination ⇒ Object
20 21 22 |
# File 'lib/endpoints.rb', line 20 def get_current_destination HoverflyAPI.get('/api/v2/hoverfly/destination').response.body end |
#get_current_middleware ⇒ Object
28 29 30 |
# File 'lib/endpoints.rb', line 28 def get_current_middleware HoverflyAPI.get('/api/v2/hoverfly/middleware').response.body end |
#get_current_mode ⇒ Object
36 37 38 |
# File 'lib/endpoints.rb', line 36 def get_current_mode HoverflyAPI.get('/api/v2/hoverfly/mode').response.body end |
#get_current_simulation_schema ⇒ Object
12 13 14 |
# File 'lib/endpoints.rb', line 12 def get_current_simulation_schema HoverflyAPI.get('/api/v2/simulation/schema').response.body end |
#get_current_simulations ⇒ Object
4 5 6 |
# File 'lib/endpoints.rb', line 4 def get_current_simulations HoverflyAPI.get('/api/v2/simulation').response.body end |
#get_logs ⇒ Object
64 65 66 |
# File 'lib/endpoints.rb', line 64 def get_logs HoverflyAPI.get('/api/v2/logs').response.body end |
#get_upstream_proxy ⇒ Object
52 53 54 |
# File 'lib/endpoints.rb', line 52 def get_upstream_proxy HoverflyAPI.get('/api/v2/hoverfly/upstream-proxy').response.body end |
#get_usage ⇒ Object
44 45 46 |
# File 'lib/endpoints.rb', line 44 def get_usage HoverflyAPI.get('/api/v2/hoverfly/usage').response.body end |
#get_version ⇒ Object
48 49 50 |
# File 'lib/endpoints.rb', line 48 def get_version HoverflyAPI.get('/api/v2/hoverfly/version').response.body end |
#update_destination(destination) ⇒ Object
24 25 26 |
# File 'lib/endpoints.rb', line 24 def update_destination(destination) HoverflyAPI.put('/api/v2/hoverfly/destination', headers: { 'Content-Type' => 'application/json' }, body: { destination: destination }.to_json).response.body end |
#update_middleware(middleware_request) ⇒ Object
32 33 34 |
# File 'lib/endpoints.rb', line 32 def update_middleware(middleware_request) HoverflyAPI.put('/api/v2/hoverfly/middleware', headers: { 'Content-Type' => 'application/json' }, body: middleware_request.to_json).response.body end |
#update_mode(mode) ⇒ Object
40 41 42 |
# File 'lib/endpoints.rb', line 40 def update_mode(mode) HoverflyAPI.put('/api/v2/hoverfly/mode', headers: { 'Content-Type' => 'application/json' }, body: { mode: mode }.to_json).response.body end |
#update_simulations(simulation) ⇒ Object
8 9 10 |
# File 'lib/endpoints.rb', line 8 def update_simulations(simulation) HoverflyAPI.put('/api/v2/simulation', headers: { 'Content-Type' => 'application/json' }, body: simulation).response.body end |