zohoProjects 0.0.4

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.
Files changed (63) hide show
  1. checksums.yaml +15 -0
  2. data/Gemfile +4 -0
  3. data/Gemfile.lock +17 -0
  4. data/LICENSE.txt +22 -0
  5. data/README.md +145 -0
  6. data/Rakefile +2 -0
  7. data/lib/projects/api/API.rb +57 -0
  8. data/lib/projects/api/BugsAPI.rb +135 -0
  9. data/lib/projects/api/DocumentsAPI.rb +145 -0
  10. data/lib/projects/api/EventsAPI.rb +115 -0
  11. data/lib/projects/api/FoldersAPI.rb +111 -0
  12. data/lib/projects/api/ForumsAPI.rb +198 -0
  13. data/lib/projects/api/MilestonesAPI.rb +159 -0
  14. data/lib/projects/api/PortalAPI.rb +41 -0
  15. data/lib/projects/api/ProjectsAPI.rb +203 -0
  16. data/lib/projects/api/TasklistsAPI.rb +113 -0
  17. data/lib/projects/api/TasksAPI.rb +153 -0
  18. data/lib/projects/api/TimesheetsAPI.rb +240 -0
  19. data/lib/projects/api/UsersAPI.rb +48 -0
  20. data/lib/projects/exception/ProjectsException.rb +50 -0
  21. data/lib/projects/model/Activity.rb +173 -0
  22. data/lib/projects/model/Bug.rb +701 -0
  23. data/lib/projects/model/Buglog.rb +56 -0
  24. data/lib/projects/model/Category.rb +70 -0
  25. data/lib/projects/model/Comment.rb +289 -0
  26. data/lib/projects/model/Document.rb +260 -0
  27. data/lib/projects/model/Event.rb +391 -0
  28. data/lib/projects/model/Folder.rb +110 -0
  29. data/lib/projects/model/Forum.rb +320 -0
  30. data/lib/projects/model/Generallog.rb +36 -0
  31. data/lib/projects/model/Log.rb +359 -0
  32. data/lib/projects/model/Milestone.rb +322 -0
  33. data/lib/projects/model/Owner.rb +54 -0
  34. data/lib/projects/model/Participant.rb +54 -0
  35. data/lib/projects/model/Portal.rb +273 -0
  36. data/lib/projects/model/Project.rb +593 -0
  37. data/lib/projects/model/Status.rb +168 -0
  38. data/lib/projects/model/Task.rb +497 -0
  39. data/lib/projects/model/Tasklist.rb +300 -0
  40. data/lib/projects/model/Tasklog.rb +56 -0
  41. data/lib/projects/model/Timelog.rb +134 -0
  42. data/lib/projects/model/TimelogList.rb +54 -0
  43. data/lib/projects/model/User.rb +94 -0
  44. data/lib/projects/model/Version.rb +194 -0
  45. data/lib/projects/parser/BugParser.rb +208 -0
  46. data/lib/projects/parser/DocumentParser.rb +197 -0
  47. data/lib/projects/parser/EventParser.rb +156 -0
  48. data/lib/projects/parser/FolderParser.rb +99 -0
  49. data/lib/projects/parser/ForumParser.rb +253 -0
  50. data/lib/projects/parser/MilestonesParser.rb +129 -0
  51. data/lib/projects/parser/PortalParser.rb +103 -0
  52. data/lib/projects/parser/ProjectParser.rb +318 -0
  53. data/lib/projects/parser/TaskParser.rb +293 -0
  54. data/lib/projects/parser/TasklistParser.rb +127 -0
  55. data/lib/projects/parser/TimesheetParser.rb +390 -0
  56. data/lib/projects/parser/UserParser.rb +63 -0
  57. data/lib/projects/service/ZohoProject.rb +174 -0
  58. data/lib/projects/util/ZohoHTTPClient.rb +205 -0
  59. data/lib/test/ProjectsTest.rb +321 -0
  60. data/lib/zohoProjects.rb +35 -0
  61. data/lib/zohoProjects/version.rb +3 -0
  62. data/zohoProjects.gemspec +86 -0
  63. metadata +135 -0
@@ -0,0 +1,300 @@
1
+ # $Id$
2
+ module Projects
3
+ module Model
4
+ # * This class is used to make an object for Tasklist.
5
+
6
+ class Tasklist
7
+
8
+ private
9
+ attr_accessor :id, :name, :completed, :createdTime, :createdTimeFormat, :createdTimeLong, :rolled, :sequence, :url, :taskUrl, :flag, :status, :milestone
10
+
11
+ public
12
+
13
+ # * Set the task list id.
14
+ #
15
+ # ==== Parameters
16
+ #
17
+ # * id:: - ID of the task list.
18
+
19
+ def setId(id)
20
+ @id = id
21
+ end
22
+
23
+ # * Get the task list id.
24
+ #
25
+ # ==== Returns
26
+ #
27
+ # * Task list id.
28
+
29
+ def getId
30
+ return @id
31
+ end
32
+
33
+ # * Set the task list name.
34
+ #
35
+ # ==== Parameters
36
+ #
37
+ # * name:: - Name of the task list.
38
+
39
+ def setName(name)
40
+ @name = name
41
+ end
42
+
43
+ # * Get the task list name.
44
+ #
45
+ # ==== Returns
46
+ #
47
+ # * task list name.
48
+
49
+ def getName
50
+ return @name
51
+ end
52
+
53
+ # * Set whether the task list is completed or not.
54
+ #
55
+ # ==== Parameters
56
+ #
57
+ # * completed:: - Whether the task list is completed or not.
58
+
59
+ def setCompleted(completed)
60
+ @completed = completed
61
+ end
62
+
63
+ # * Get whether the task list is completed or not.
64
+ #
65
+ # ==== Returns
66
+ #
67
+ # * true, if the task list is completed else returns false.
68
+
69
+ def isCompleted
70
+ return @completed
71
+ end
72
+
73
+ # * Set the task list created time.
74
+ #
75
+ # ==== Parameters
76
+ #
77
+ # * createdTime:: - Task list created time.
78
+
79
+ def setCreatedTime(createdTime)
80
+ @createdTime = createdTime
81
+ end
82
+
83
+ # * Get the task list created time.
84
+ #
85
+ # ==== Returns
86
+ #
87
+ # * Task list created time.
88
+
89
+ def getCreatedTime
90
+ return @createdTime
91
+ end
92
+
93
+ # * Set the task list created time format.
94
+ #
95
+ # ==== Parameters
96
+ #
97
+ # * createdTime:: - Task list created time format.
98
+
99
+ def setCreatedTimeFormat(createdTimeFormat)
100
+ @createdTimeFormat = createdTimeFormat
101
+ end
102
+
103
+ # * Get the task list created time format.
104
+ #
105
+ # ==== Returns
106
+ #
107
+ # * Task list created time format.
108
+
109
+ def getCreatedTimeFormat
110
+ return @createdTimeFormat
111
+ end
112
+
113
+ # * Set the task list created time long.
114
+ #
115
+ # ==== Parameters
116
+ #
117
+ # * createdTimeLong:: - Task list created time long.
118
+
119
+ def setCreatedTimeLong(createdTimeLong)
120
+ @createdTimeLong = createdTimeLong
121
+ end
122
+
123
+ # * Get the task list created time long.
124
+ #
125
+ # ==== Returns
126
+ #
127
+ # * Task list created time long.
128
+
129
+ def getCreatedTimeLong
130
+ return @createdTimeLong
131
+ end
132
+
133
+ # * Set whether the task list is rolled or not.
134
+ #
135
+ # ==== Parameters
136
+ #
137
+ # * rolled:: - Whether the task list is rolled or not.
138
+
139
+ def setRolled(rolled)
140
+ @rolled = rolled
141
+ end
142
+
143
+ # * Get whether the task list rolled or not.
144
+ #
145
+ # ==== Returns
146
+ #
147
+ # * true, if the task list is rolled else returns false.
148
+
149
+ def isRolled
150
+ return rolled
151
+ end
152
+
153
+ # * Set the sequence of the task list.
154
+ #
155
+ # ==== Parameters
156
+ #
157
+ # * sequence:: - Sequence of the task list.
158
+
159
+ def setSequence(sequence)
160
+ @sequence = sequence
161
+ end
162
+
163
+ # * Get the sequence of the task list.
164
+ #
165
+ # ==== Returns
166
+ #
167
+ # * Sequence of the task list.
168
+
169
+ def getSequence
170
+ return @sequence
171
+ end
172
+
173
+ # * Set the task list URL.
174
+ #
175
+ # ==== Parameters
176
+ #
177
+ # * url:: - URL for the task list.
178
+
179
+ def setURL(url)
180
+ @url = url
181
+ end
182
+
183
+ # * Get the task list URL.
184
+ #
185
+ # ==== Returns
186
+ #
187
+ # * Task list URL.
188
+
189
+ def getURL
190
+ return @url
191
+ end
192
+
193
+ # * Set the task URL.
194
+ #
195
+ # ==== Parameters
196
+ #
197
+ # * taskUrl:: - URL for the task.
198
+
199
+ def setTaskURL(taskUrl)
200
+ @taskUrl = taskUrl
201
+ end
202
+
203
+ # * Get the task URL.
204
+ #
205
+ # ==== Returns
206
+ #
207
+ # * Task URL.
208
+
209
+ def getTaskURL
210
+ return @taskUrl
211
+ end
212
+
213
+ # * Set the flag for the task list.
214
+ #
215
+ # ==== Parameters
216
+ #
217
+ # * flag:: - Flag for the task list.
218
+
219
+ def setFlag(flag)
220
+ @flag = flag
221
+ end
222
+
223
+ # * Get the flag for the task list.
224
+ #
225
+ # ==== Returns
226
+ #
227
+ # * Task list flag.
228
+
229
+ def getFlag
230
+ return @flag
231
+ end
232
+
233
+ # * Set the status of the task list.
234
+ #
235
+ # ==== Parameters
236
+ #
237
+ # * status:: - Status of the task list.
238
+
239
+ def setStatus(status)
240
+ @status = status
241
+ end
242
+
243
+ # * Get the status of the task list.
244
+ #
245
+ # ==== Returns
246
+ #
247
+ # * Status of the task list.
248
+
249
+ def getStatus
250
+ return @status
251
+ end
252
+
253
+ # * Set the milestone for the task list.
254
+ #
255
+ # ==== Parameters
256
+ #
257
+ # * milestone:: - Milestone object.
258
+
259
+ def setMilestone(milestone)
260
+ @milestone = milestone
261
+ end
262
+
263
+ # * Get the milestone for the task list.
264
+ #
265
+ # ==== Returns
266
+ #
267
+ # * Milestone object.
268
+
269
+ def getMilestone
270
+ return @milestone
271
+ end
272
+
273
+ # * Convert the Tasklist object into HashMap.
274
+ #
275
+ # ==== Returns
276
+ #
277
+ # * HashMap object.
278
+
279
+ def toParamMAP
280
+ requestBody = Hash.new
281
+
282
+ if milestone != nil
283
+ requestBody["milestone_id"] = milestone.getId
284
+ end
285
+ if name != nil
286
+ requestBody["name"] = name
287
+ end
288
+ if flag != nil
289
+ requestBody["flag"] = flag
290
+ end
291
+ if status != nil
292
+ requestBody["status"] = status
293
+ end
294
+
295
+ return requestBody
296
+ end
297
+
298
+ end
299
+ end
300
+ end
@@ -0,0 +1,56 @@
1
+ # $Id$
2
+ module Projects
3
+ module Model
4
+ require File.dirname(__FILE__) + '/Log'
5
+
6
+ # * This class is used to make an object for Tasklog.
7
+
8
+ class Tasklog < Log
9
+
10
+ private
11
+ attr_accessor :taskId, :taskName
12
+
13
+ public
14
+
15
+ # * Set the task id.
16
+ #
17
+ # ==== Parameters
18
+ #
19
+ # * taskId:: - ID of the task.
20
+
21
+ def setTaskId(taskId)
22
+ @taskId = taskId
23
+ end
24
+
25
+ # * Get the task id.
26
+ #
27
+ # ==== Returns
28
+ #
29
+ # * ID of the task.
30
+
31
+ def getTaskId
32
+ return @taskId
33
+ end
34
+
35
+ # * Set the task name.
36
+ #
37
+ # ==== Parameters
38
+ #
39
+ # * taskName:: - Name of the task.
40
+
41
+ def setTaskName(taskName)
42
+ @taskName = taskName
43
+ end
44
+
45
+ # * Get the task name.
46
+ #
47
+ # ==== Returns
48
+ #
49
+ # * Task name.
50
+
51
+ def getTaskName
52
+ return @taskName
53
+ end
54
+ end
55
+ end
56
+ end
@@ -0,0 +1,134 @@
1
+ # $Id$
2
+ module Projects
3
+ module Model
4
+ # * This class is used to make an object for Timelog.
5
+
6
+ class Timelog
7
+
8
+ private
9
+ attr_accessor :dateLong, :displayFormat, :totalHours, :buglogs, :tasklogs, :generallogs
10
+
11
+ public
12
+
13
+ # * Set the date for the time log.
14
+ #
15
+ # ==== Parameters
16
+ #
17
+ # * dateLong:: - Date for the time log.
18
+
19
+ def setDateLong(dateLong)
20
+ @dateLong = dateLong
21
+ end
22
+
23
+ # * Get the date long of the time log.
24
+ #
25
+ # ==== Returns
26
+ #
27
+ # * date of the time log.
28
+
29
+ def getDateLong
30
+ return @dateLong
31
+ end
32
+
33
+ # * Set the display format for the date.
34
+ #
35
+ # ==== Parameters
36
+ #
37
+ # * displayFormat:: - Display format for the date.
38
+
39
+ def setDisplayFormat(displayFormat)
40
+ @displayFormat = displayFormat
41
+ end
42
+
43
+ # * Get the display format of the date.
44
+ #
45
+ # ==== Returns
46
+ #
47
+ # * display format of the date.
48
+
49
+ def getDisplayFormat
50
+ return @displayFormat
51
+ end
52
+
53
+ # * Set the total hours for the time log.
54
+ #
55
+ # ==== Parameters
56
+ #
57
+ # * totalHours:: - Total hours for the time log.
58
+
59
+ def setTotalHours(totalHours)
60
+ @totalHours = totalHours
61
+ end
62
+
63
+ # * Get the total hours of the time log.
64
+ #
65
+ # ==== Returns
66
+ #
67
+ # * total hours of the time log.
68
+
69
+ def getTotalHours
70
+ return @totalHours
71
+ end
72
+
73
+ # * Set the bug logs.
74
+ #
75
+ # ==== Parameters
76
+ #
77
+ # * buglogs:: - List of Buglog object.
78
+
79
+ def setBuglogs(buglogs)
80
+ @buglogs = buglogs
81
+ end
82
+
83
+ # * Get the bug logs.
84
+ #
85
+ # ==== Returns
86
+ #
87
+ # * List of Buglog object.
88
+
89
+ def getBuglogs
90
+ return @buglogs
91
+ end
92
+
93
+ # * Set the task logs.
94
+ #
95
+ # ==== Parameters
96
+ #
97
+ # * tasklogs:: - List of Tasklog object.
98
+
99
+ def setTasklogs(tasklogs)
100
+ @tasklogs = tasklogs
101
+ end
102
+
103
+ # * Get the task logs.
104
+ #
105
+ # ==== Returns
106
+ #
107
+ # * List of Tasklog object.
108
+
109
+ def getTasklogs
110
+ return @tasklogs
111
+ end
112
+
113
+ # * Set the general logs.
114
+ #
115
+ # ==== Parameters
116
+ #
117
+ # * generallogs:: - List of Generallog object.
118
+
119
+ def setGenerallogs(generallogs)
120
+ @generallogs = generallogs
121
+ end
122
+
123
+ # * Get the general logs.
124
+ #
125
+ # ==== Returns
126
+ #
127
+ # * List of Generallog object.
128
+
129
+ def getGenerallogs
130
+ return @generallogs
131
+ end
132
+ end
133
+ end
134
+ end