Class: MustardClient::EnvironmentsClient
- Inherits:
-
Client
- Object
- Client
- MustardClient::EnvironmentsClient
show all
- Defined in:
- lib/MustardClient/environments.rb
Instance Method Summary
collapse
Methods inherited from Client
#execute, #initialize
Instance Method Details
#add(environment_params) ⇒ Object
16
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/MustardClient/environments.rb', line 16
def add environment_params
command = {}
command[:method] = :post
command[:route] = @mustard_url + "/environments"
command[:params] = {environment: environment_params}
command[:headers] = {'User-Token' => @user_token}
execute(command)
end
|
#delete(environment_id) ⇒ Object
28
29
30
31
32
33
34
35
36
37
|
# File 'lib/MustardClient/environments.rb', line 28
def delete environment_id
command = {}
command[:method] = :delete
command[:route] = @mustard_url + "/environments/#{environment_id}"
command[:headers] = {'User-Token' => @user_token}
execute(command)
end
|
#find(environment_id) ⇒ Object
5
6
7
8
9
10
11
12
13
14
|
# File 'lib/MustardClient/environments.rb', line 5
def find environment_id
command = {}
command[:method] = :get
command[:route] = @mustard_url + "/environments/#{environment_id}"
command[:headers] = {'User-Token' => @user_token}
execute(command)
end
|
#update(environment_id, environment_params) ⇒ Object
39
40
41
42
43
44
45
46
47
48
49
|
# File 'lib/MustardClient/environments.rb', line 39
def update environment_id, environment_params
command = {}
command[:method] = :put
command[:route] = @mustard_url + "/environments/#{environment_id}"
command[:headers] = {'User-Token' => @user_token}
command[:params] = {environment: environment_params}
execute(command)
end
|