Module: Teleflow::Api::Environments
- Included in:
- Client
- Defined in:
- lib/teleflow/api/environments.rb
Overview
Module Teleflow::Api::Environments provides an API for managing environments in the Teleflow application.
This module includes methods for creating, retrieving, and updating environments. It also includes methods for getting and regenerating the api keys also for updatation of widget settings .
For more information on the Teleflow API(api-teleflow.khulnasoft.com/api#/Environments), see docs.teleflow.khulnasoft.com/api/get-current-environment/.
Instance Method Summary collapse
-
#api_keys ⇒ Hash, number
Returns a list of api keys.
-
#create_environment(body) ⇒ Hash, number
Creates a new environment.
-
#current_environment ⇒ Hash, number
Retrieves the current environment.
-
#environments ⇒ Hash, number
Returns a list of environments.
-
#regenerate_api_keys ⇒ Hash, number
Return regenerated api keys.
-
#update_environment(environment_id, body) ⇒ Hash, number
Update the environment.
-
#update_widget_settings(body) ⇒ Hash, number
Update the widget settings.
Instance Method Details
#api_keys ⇒ Hash, number
Returns a list of api keys
65 66 67 |
# File 'lib/teleflow/api/environments.rb', line 65 def api_keys get("/environments/api-keys") end |
#create_environment(body) ⇒ Hash, number
Creates a new environment.
@bodyparams:
29 30 31 |
# File 'lib/teleflow/api/environments.rb', line 29 def create_environment(body) post("/environments", body: body) end |
#current_environment ⇒ Hash, number
Retrieves the current environment
17 18 19 |
# File 'lib/teleflow/api/environments.rb', line 17 def current_environment get("/environments/me") end |
#environments ⇒ Hash, number
Returns a list of environments
38 39 40 |
# File 'lib/teleflow/api/environments.rb', line 38 def environments get("/environments") end |
#regenerate_api_keys ⇒ Hash, number
Return regenerated api keys
74 75 76 |
# File 'lib/teleflow/api/environments.rb', line 74 def regenerate_api_keys post("/environments/api-keys/regenerate") end |
#update_environment(environment_id, body) ⇒ Hash, number
Update the environment.
@pathparams:
56 57 58 |
# File 'lib/teleflow/api/environments.rb', line 56 def update_environment(environment_id, body) put("/environments/#{environment_id}", body: body) end |
#update_widget_settings(body) ⇒ Hash, number
Update the widget settings.
86 87 88 |
# File 'lib/teleflow/api/environments.rb', line 86 def (body) put("/environments/widget/settings", body: body) end |