Class: MustardClient::ProjectsClient
- Inherits:
-
Client
- Object
- Client
- MustardClient::ProjectsClient
show all
- Defined in:
- lib/MustardClient/projects.rb
Instance Method Summary
collapse
Methods inherited from Client
#execute, #initialize
Instance Method Details
#add(project_params) ⇒ Object
27
28
29
30
31
32
33
34
35
36
37
|
# File 'lib/MustardClient/projects.rb', line 27
def add project_params
command = {}
command[:method] = :post
command[:route] = @mustard_url + "/projects"
command[:params] = {project: project_params}
command[:headers] = {'User-Token' => @user_token}
execute(command)
end
|
#all ⇒ Object
5
6
7
8
9
10
11
12
13
14
|
# File 'lib/MustardClient/projects.rb', line 5
def all
command = {}
command[:method] = :get
command[:route] = @mustard_url + '/projects'
command[:headers] = {'User-Token' => @user_token}
execute(command)
end
|
#delete(project_id) ⇒ Object
39
40
41
42
43
44
45
46
47
48
|
# File 'lib/MustardClient/projects.rb', line 39
def delete project_id
command = {}
command[:method] = :delete
command[:route] = @mustard_url + "/projects/#{project_id}"
command[:headers] = {'User-Token' => @user_token}
execute(command)
end
|
#environments(project_id) ⇒ Object
62
63
64
65
66
67
68
69
70
71
|
# File 'lib/MustardClient/projects.rb', line 62
def environments project_id
command = {}
command[:method] = :get
command[:route] = @mustard_url + "/projects/#{project_id}/environments"
command[:headers] = {'User-Token' => @user_token}
execute(command)
end
|
#executions(project_id) ⇒ Object
95
96
97
98
99
100
101
102
103
104
|
# File 'lib/MustardClient/projects.rb', line 95
def executions project_id
command = {}
command[:method] = :get
command[:route] = @mustard_url + "/projects/#{project_id}/executions"
command[:headers] = {'User-Token' => @user_token}
execute(command)
end
|
#find(project_id) ⇒ Object
16
17
18
19
20
21
22
23
24
25
|
# File 'lib/MustardClient/projects.rb', line 16
def find project_id
command = {}
command[:method] = :get
command[:route] = @mustard_url + "/projects/#{project_id}"
command[:headers] = {'User-Token' => @user_token}
execute(command)
end
|
#keywords(project_id) ⇒ Object
73
74
75
76
77
78
79
80
81
82
|
# File 'lib/MustardClient/projects.rb', line 73
def keywords project_id
command = {}
command[:method] = :get
command[:route] = @mustard_url + "/projects/#{project_id}/keywords"
command[:headers] = {'User-Token' => @user_token}
execute(command)
end
|
#testcases(project_id) ⇒ Object
84
85
86
87
88
89
90
91
92
93
|
# File 'lib/MustardClient/projects.rb', line 84
def testcases project_id
command = {}
command[:method] = :get
command[:route] = @mustard_url + "/projects/#{project_id}/testcases"
command[:headers] = {'User-Token' => @user_token}
execute(command)
end
|
#update(project_id, project_params) ⇒ Object
50
51
52
53
54
55
56
57
58
59
60
|
# File 'lib/MustardClient/projects.rb', line 50
def update project_id, project_params
command = {}
command[:method] = :put
command[:route] = @mustard_url + "/projects/#{project_id}"
command[:headers] = {'User-Token' => @user_token}
command[:params] = {project: project_params}
execute(command)
end
|