zohoProjects 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/{LICENSE.txt → LICENSE} +2 -2
- data/README.md +3 -3
- data/lib/projects/api/BugsAPI.rb +46 -1
- data/lib/projects/api/DocumentsAPI.rb +1 -1
- data/lib/projects/api/TasksAPI.rb +101 -1
- data/lib/projects/model/Bug.rb +2 -2
- data/lib/projects/model/Buglog.rb +1 -1
- data/lib/projects/model/Customfield.rb +120 -0
- data/lib/projects/model/Defaultfield.rb +141 -0
- data/lib/projects/model/Task.rb +31 -4
- data/lib/projects/parser/BugParser.rb +211 -2
- data/lib/projects/parser/TaskParser.rb +69 -8
- data/lib/projects/service/ZohoProject.rb +1 -1
- data/lib/zohoProjects.rb +2 -0
- data/lib/zohoProjects/version.rb +1 -1
- data/zohoProjects.gemspec +3 -2
- metadata +29 -32
- checksums.yaml +0 -15
- data/lib/test/ProjectsTest.rb +0 -321
data/{LICENSE.txt → LICENSE}
RENAMED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# ZohoProjects
|
2
2
|
|
3
|
-
|
3
|
+
The ruby library for integrating with ZohoProjects.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -135,10 +135,10 @@ When calling Zoho Projects API wrappers if there is any error then the respectiv
|
|
135
135
|
puts "Message: " + pe.getMessage
|
136
136
|
end
|
137
137
|
|
138
|
-
See [Here](../../tree/master/
|
138
|
+
See [Here](../../tree/master/test) for full examples.
|
139
139
|
## Contributing
|
140
140
|
|
141
|
-
1. Fork it
|
141
|
+
1. Fork it
|
142
142
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
143
143
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
144
144
|
4. Push to the branch (`git push origin my-new-feature`)
|
data/lib/projects/api/BugsAPI.rb
CHANGED
@@ -130,6 +130,51 @@ module Projects
|
|
130
130
|
response = ZohoHTTPClient.delete(url, getQueryMap)
|
131
131
|
return $bugParser.getResult(response)
|
132
132
|
end
|
133
|
+
|
134
|
+
|
135
|
+
# * Get all the default fields in the given project.
|
136
|
+
#
|
137
|
+
# ==== Parameters
|
138
|
+
#
|
139
|
+
# * projectId:: - ID of the project.
|
140
|
+
#
|
141
|
+
# ==== Returns
|
142
|
+
#
|
143
|
+
# * Returns the Defaultfield object.
|
144
|
+
|
145
|
+
|
146
|
+
def getDefaultfields(projectId)
|
147
|
+
|
148
|
+
url = getBaseURL+"projects/"+String(projectId)+"/defaultfields/"
|
149
|
+
|
150
|
+
response = ZohoHTTPClient.get(url, getQueryMap)
|
151
|
+
|
152
|
+
return @bugParser.getDefaultfields(response)
|
153
|
+
|
154
|
+
end
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
# * Get all the custom fields in the given project.
|
159
|
+
#
|
160
|
+
# ==== Parameters
|
161
|
+
#
|
162
|
+
# * projectId:: - ID of the project.
|
163
|
+
#
|
164
|
+
# ==== Returns
|
165
|
+
#
|
166
|
+
# * Returns list of Customfield object.
|
167
|
+
|
168
|
+
def getCustomfields(projectId)
|
169
|
+
|
170
|
+
url = getBaseURL+"projects/"+String(projectId)+"/customfields/"
|
171
|
+
|
172
|
+
response = ZohoHTTPClient.get(url, getQueryMap)
|
173
|
+
|
174
|
+
return @bugParser.getCustomfields(response)
|
175
|
+
|
176
|
+
end
|
177
|
+
|
133
178
|
end
|
134
179
|
end
|
135
|
-
end
|
180
|
+
end
|
@@ -148,6 +148,106 @@ module Projects
|
|
148
148
|
response = ZohoHTTPClient.delete(url, getQueryMap)
|
149
149
|
return $taskParser.getResult(response)
|
150
150
|
end
|
151
|
+
|
152
|
+
|
153
|
+
# * Get all the subtasks of the given task.
|
154
|
+
#
|
155
|
+
# ==== Parameters
|
156
|
+
#
|
157
|
+
# * projectId:: - ID of the project.
|
158
|
+
#
|
159
|
+
# * taskId:: - ID of the task.
|
160
|
+
#
|
161
|
+
# ==== Returns
|
162
|
+
#
|
163
|
+
# * List of Task object.
|
164
|
+
|
165
|
+
|
166
|
+
def getSubtasks(projectId, taskId, queryMap)
|
167
|
+
|
168
|
+
url = getBaseURL+"projects/"+String(projectId)+"/tasks/"+String(taskId)+"/subtasks/"
|
169
|
+
|
170
|
+
response = ZohoHTTPClient.get(url, getQueryMap(queryMap))
|
171
|
+
|
172
|
+
return @taskParser.getTasks(response)
|
173
|
+
end
|
174
|
+
|
175
|
+
|
176
|
+
# * Get all the task comment.
|
177
|
+
#
|
178
|
+
# ==== Parameters
|
179
|
+
#
|
180
|
+
# * projectId:: - ID of the project.
|
181
|
+
#
|
182
|
+
# * taskId:: - ID of the task.
|
183
|
+
#
|
184
|
+
# ==== Returns
|
185
|
+
#
|
186
|
+
# * List of Comment object.
|
187
|
+
|
188
|
+
def getComments(projectId, taskId, queryMap)
|
189
|
+
|
190
|
+
url = getBaseURL+"projects/"+String(projectId)+"/tasks/"+String(taskId)+"/comments/"
|
191
|
+
|
192
|
+
response = ZohoHTTPClient.get(url, getQueryMap(queryMap))
|
193
|
+
|
194
|
+
return @taskParser.getComments(response)
|
195
|
+
|
196
|
+
end
|
197
|
+
|
198
|
+
# * Add the task comment.
|
199
|
+
#
|
200
|
+
# ==== Parameters
|
201
|
+
#
|
202
|
+
# * projectId:: - ID of the project.
|
203
|
+
#
|
204
|
+
# * taskId:: - ID of the task.
|
205
|
+
#
|
206
|
+
# * content:: - Comment of the task
|
207
|
+
#
|
208
|
+
# ==== Returns
|
209
|
+
#
|
210
|
+
# * Returns the Comment object.
|
211
|
+
|
212
|
+
def addComment(projectId, taskId, content)
|
213
|
+
|
214
|
+
url = getBaseURL+"projects/"+String(projectId)+"/tasks/"+String(taskId)+"/comments/"
|
215
|
+
|
216
|
+
paramMap = Hash.new
|
217
|
+
paramMap["content"] = content
|
218
|
+
|
219
|
+
response = ZohoHTTPClient.post(url, getQueryMap, paramMap)
|
220
|
+
|
221
|
+
return @taskParser.getComment(response)
|
222
|
+
|
223
|
+
end
|
224
|
+
|
225
|
+
|
226
|
+
# * Delete an existing task comment.
|
227
|
+
#
|
228
|
+
# ==== Parameters
|
229
|
+
#
|
230
|
+
# * projectId:: - ID of the project.
|
231
|
+
#
|
232
|
+
# * taskId:: - ID of the task.
|
233
|
+
#
|
234
|
+
# * commentId:: - ID of the task Comment.
|
235
|
+
#
|
236
|
+
# ==== Returns
|
237
|
+
#
|
238
|
+
# * Returns the success message(Comment Deleted Successfully).
|
239
|
+
|
240
|
+
def deleteComment(projectId, taskId, commentId)
|
241
|
+
|
242
|
+
url = getBaseURL+"projects/"+String(projectId)+"/tasks/"+String(taskId)+"/comments/"+String(commentId)+"/"
|
243
|
+
|
244
|
+
response = ZohoHTTPClient.delete(url, getQueryMap)
|
245
|
+
|
246
|
+
return @taskParser.getResult(response)
|
247
|
+
|
248
|
+
end
|
249
|
+
|
250
|
+
|
151
251
|
end
|
152
252
|
end
|
153
|
-
end
|
253
|
+
end
|
data/lib/projects/model/Bug.rb
CHANGED
@@ -6,7 +6,7 @@ module Projects
|
|
6
6
|
class Bug
|
7
7
|
|
8
8
|
private
|
9
|
-
|
9
|
+
attr_accessor :id, :key, :projectId, :flag, :title, :description, :reporterId, :reportedPerson, :createdTime, :createdTimeFormat, :createdTimeLong, :assigneeId, :assigneeName, :closed, :url, :timesheetUrl, :classificationId, :classificationType, :severityId, :severityType, :statusId, :statusType, :reproducibleId, :reproducibleType, :moduleId, :moduleName, :milestoneId, :dueDate, :dueDateFormat, :dueDateLong;
|
10
10
|
|
11
11
|
public
|
12
12
|
|
@@ -698,4 +698,4 @@ module Projects
|
|
698
698
|
end
|
699
699
|
end
|
700
700
|
end
|
701
|
-
end
|
701
|
+
end
|
@@ -0,0 +1,120 @@
|
|
1
|
+
# $Id$
|
2
|
+
|
3
|
+
module Projects
|
4
|
+
|
5
|
+
module Model
|
6
|
+
|
7
|
+
# * Customfield is used to make an object for projects custom field.
|
8
|
+
|
9
|
+
class Customfield
|
10
|
+
|
11
|
+
|
12
|
+
private
|
13
|
+
|
14
|
+
attr_accessor :labelName, :columnName, :defaultValue, :picklistValues;
|
15
|
+
|
16
|
+
|
17
|
+
public
|
18
|
+
|
19
|
+
|
20
|
+
# * Set the label name of the custom field.
|
21
|
+
#
|
22
|
+
# ==== Parameters
|
23
|
+
#
|
24
|
+
# * labelName:: - Label name of the custom field.
|
25
|
+
|
26
|
+
def setLabelName(labelName)
|
27
|
+
|
28
|
+
@labelName = labelName
|
29
|
+
|
30
|
+
end
|
31
|
+
|
32
|
+
# * Get the label name of the custom field.
|
33
|
+
#
|
34
|
+
# ==== Returns
|
35
|
+
#
|
36
|
+
# * Returns the label name.
|
37
|
+
|
38
|
+
def getLabelName
|
39
|
+
|
40
|
+
return @labelName
|
41
|
+
|
42
|
+
end
|
43
|
+
|
44
|
+
# * Set the column name of the custom field.
|
45
|
+
#
|
46
|
+
# ==== Parameters
|
47
|
+
#
|
48
|
+
# * columnName:: - Column name of the custom field.
|
49
|
+
|
50
|
+
def setColumnName(columnName)
|
51
|
+
|
52
|
+
@columnName = columnName
|
53
|
+
|
54
|
+
end
|
55
|
+
|
56
|
+
# * Get the column name of the custom field.
|
57
|
+
#
|
58
|
+
# ==== Returns
|
59
|
+
#
|
60
|
+
# Returns the column name.
|
61
|
+
|
62
|
+
def getColumnName
|
63
|
+
|
64
|
+
return @columnName
|
65
|
+
|
66
|
+
end
|
67
|
+
|
68
|
+
# * Set the default value of the custom field.
|
69
|
+
#
|
70
|
+
# ==== Parameters
|
71
|
+
#
|
72
|
+
# * defaultValue:: - Default value of the custom field.
|
73
|
+
|
74
|
+
def setDefaultValue(defaultValue)
|
75
|
+
|
76
|
+
@defaultValue = defaultValue
|
77
|
+
|
78
|
+
end
|
79
|
+
|
80
|
+
# * Get the default value of the custom field.
|
81
|
+
#
|
82
|
+
# ==== Returns
|
83
|
+
#
|
84
|
+
# * Returns the default value.
|
85
|
+
|
86
|
+
def getDefaultValue
|
87
|
+
|
88
|
+
return @defaultValue
|
89
|
+
|
90
|
+
end
|
91
|
+
|
92
|
+
# * Set the picklist values of the custom field.
|
93
|
+
#
|
94
|
+
# ==== Parameters
|
95
|
+
#
|
96
|
+
# * picklistValues:: - Picklist values of the custom field.
|
97
|
+
|
98
|
+
def setPicklistValues(picklistValues)
|
99
|
+
|
100
|
+
@picklistValues = picklistValues
|
101
|
+
|
102
|
+
end
|
103
|
+
|
104
|
+
# * Get the picklist values of the custom field.
|
105
|
+
#
|
106
|
+
# ==== Returns
|
107
|
+
#
|
108
|
+
# * Returns the picklist values
|
109
|
+
|
110
|
+
def getPicklistValues
|
111
|
+
|
112
|
+
return @picklistValues
|
113
|
+
|
114
|
+
end
|
115
|
+
|
116
|
+
end
|
117
|
+
|
118
|
+
end
|
119
|
+
|
120
|
+
end
|
@@ -0,0 +1,141 @@
|
|
1
|
+
# $Id$
|
2
|
+
|
3
|
+
module Projects
|
4
|
+
|
5
|
+
module Model
|
6
|
+
|
7
|
+
# * Defaultfield is used to make an object for projects default field.
|
8
|
+
|
9
|
+
class Defaultfield
|
10
|
+
|
11
|
+
private
|
12
|
+
|
13
|
+
attr_accessor :severityDetails, :statusDeatils, :moduleDetails, :priorityDetails, :classificationDetails;
|
14
|
+
|
15
|
+
|
16
|
+
public
|
17
|
+
|
18
|
+
# * Set the severity details of the project.
|
19
|
+
#
|
20
|
+
# ==== Parameters
|
21
|
+
#
|
22
|
+
# * severityDetails:: - List of Severity details of the project.
|
23
|
+
|
24
|
+
def setSeverityDetails(severityDetails)
|
25
|
+
|
26
|
+
@severityDetails = severityDetails
|
27
|
+
|
28
|
+
end
|
29
|
+
|
30
|
+
# * Get the severity details of the project.
|
31
|
+
#
|
32
|
+
# ==== Returns
|
33
|
+
#
|
34
|
+
# * Returns list of severity details.
|
35
|
+
|
36
|
+
def getSeverityDetails
|
37
|
+
|
38
|
+
return @severityDetails
|
39
|
+
|
40
|
+
end
|
41
|
+
|
42
|
+
# * Set the stauts details of the project.
|
43
|
+
#
|
44
|
+
# ==== Prameters
|
45
|
+
#
|
46
|
+
# * statusDeatils:: - List of Stauts details of the project.
|
47
|
+
|
48
|
+
def setStatusDeatils(statusDeatils)
|
49
|
+
|
50
|
+
@statusDeatils = statusDeatils
|
51
|
+
|
52
|
+
end
|
53
|
+
|
54
|
+
# * Get the status details of the project.
|
55
|
+
#
|
56
|
+
# ==== Returns
|
57
|
+
#
|
58
|
+
# * Returns list of status details.
|
59
|
+
|
60
|
+
def getStatusDeatils
|
61
|
+
|
62
|
+
return @statusDeatils
|
63
|
+
|
64
|
+
end
|
65
|
+
|
66
|
+
# * Set the module details of the project.
|
67
|
+
#
|
68
|
+
# ==== Parameters
|
69
|
+
#
|
70
|
+
# * moduleDetails:: - List of Module details of the project.
|
71
|
+
|
72
|
+
def setModuleDetails(moduleDetails)
|
73
|
+
|
74
|
+
@moduleDetails = moduleDetails
|
75
|
+
|
76
|
+
end
|
77
|
+
|
78
|
+
# * Get the module details of the project.
|
79
|
+
#
|
80
|
+
# ==== Returns
|
81
|
+
#
|
82
|
+
# * Returns list of module details.
|
83
|
+
|
84
|
+
def getModuleDetails
|
85
|
+
|
86
|
+
return @moduleDetails
|
87
|
+
|
88
|
+
end
|
89
|
+
|
90
|
+
# * Set the priority details of the project.
|
91
|
+
#
|
92
|
+
# ==== Parameters
|
93
|
+
#
|
94
|
+
# * priorityDetails:: - List of Priority details of the project.
|
95
|
+
|
96
|
+
def setPriorityDetails(priorityDetails)
|
97
|
+
|
98
|
+
@priorityDetails = priorityDetails
|
99
|
+
|
100
|
+
end
|
101
|
+
|
102
|
+
# * Get the priority details of the project.
|
103
|
+
#
|
104
|
+
# ==== Returns
|
105
|
+
#
|
106
|
+
# * Returns list of priority details.
|
107
|
+
|
108
|
+
def getPriorityDetails
|
109
|
+
|
110
|
+
return @priorityDetails
|
111
|
+
|
112
|
+
end
|
113
|
+
|
114
|
+
# * Set the classification details of the project.
|
115
|
+
#
|
116
|
+
# ==== Parameters
|
117
|
+
#
|
118
|
+
# * classificationDetails:: - List of Classification details of the project.
|
119
|
+
|
120
|
+
def setClassificationDetails(classificationDetails)
|
121
|
+
|
122
|
+
@classificationDetails = classificationDetails
|
123
|
+
|
124
|
+
end
|
125
|
+
|
126
|
+
# * Get the classification details of the project.
|
127
|
+
#
|
128
|
+
# ==== Returns
|
129
|
+
#
|
130
|
+
# * Returns list of classification details.
|
131
|
+
|
132
|
+
def getClassificationDetails
|
133
|
+
|
134
|
+
return @classificationDetails
|
135
|
+
|
136
|
+
end
|
137
|
+
|
138
|
+
end
|
139
|
+
end
|
140
|
+
end
|
141
|
+
|