IVLE 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. data/.gitignore +4 -0
  2. data/Gemfile +4 -0
  3. data/IVLE.gemspec +29 -0
  4. data/LICENSE +7 -0
  5. data/README.md +61 -0
  6. data/Rakefile +1 -0
  7. data/config/settings.yml +2 -0
  8. data/doc/Fixtures.html +167 -0
  9. data/doc/Fixtures/IVLE.html +213 -0
  10. data/doc/Gemfile.html +133 -0
  11. data/doc/IVLE.html +278 -0
  12. data/doc/IVLE/API.html +424 -0
  13. data/doc/IVLE/Announcement.html +309 -0
  14. data/doc/IVLE/Community.html +1305 -0
  15. data/doc/IVLE/Consultation.html +342 -0
  16. data/doc/IVLE/DeltaDatasets.html +213 -0
  17. data/doc/IVLE/Forum.html +533 -0
  18. data/doc/IVLE/Gradebook.html +213 -0
  19. data/doc/IVLE/IVLEModule.html +567 -0
  20. data/doc/IVLE/IVLENews.html +213 -0
  21. data/doc/IVLE/LibraryEReserves.html +245 -0
  22. data/doc/IVLE/Login.html +309 -0
  23. data/doc/IVLE/MyOrganizer.html +520 -0
  24. data/doc/IVLE/OpenWebcastLectures.html +247 -0
  25. data/doc/IVLE/Poll.html +309 -0
  26. data/doc/IVLE/Profile.html +213 -0
  27. data/doc/IVLE/RostersAndGroups.html +676 -0
  28. data/doc/IVLE/StudentEvents.html +378 -0
  29. data/doc/IVLE/Timetable.html +309 -0
  30. data/doc/IVLE/Webcast.html +247 -0
  31. data/doc/IVLE/Workbin.html +245 -0
  32. data/doc/Object.html +185 -0
  33. data/doc/Rakefile.html +131 -0
  34. data/doc/created.rid +26 -0
  35. data/doc/images/add.png +0 -0
  36. data/doc/images/brick.png +0 -0
  37. data/doc/images/brick_link.png +0 -0
  38. data/doc/images/bug.png +0 -0
  39. data/doc/images/bullet_black.png +0 -0
  40. data/doc/images/bullet_toggle_minus.png +0 -0
  41. data/doc/images/bullet_toggle_plus.png +0 -0
  42. data/doc/images/date.png +0 -0
  43. data/doc/images/delete.png +0 -0
  44. data/doc/images/find.png +0 -0
  45. data/doc/images/loadingAnimation.gif +0 -0
  46. data/doc/images/macFFBgHack.png +0 -0
  47. data/doc/images/package.png +0 -0
  48. data/doc/images/page_green.png +0 -0
  49. data/doc/images/page_white_text.png +0 -0
  50. data/doc/images/page_white_width.png +0 -0
  51. data/doc/images/plugin.png +0 -0
  52. data/doc/images/ruby.png +0 -0
  53. data/doc/images/tag_blue.png +0 -0
  54. data/doc/images/tag_green.png +0 -0
  55. data/doc/images/transparent.png +0 -0
  56. data/doc/images/wrench.png +0 -0
  57. data/doc/images/wrench_orange.png +0 -0
  58. data/doc/images/zoom.png +0 -0
  59. data/doc/index.html +126 -0
  60. data/doc/js/darkfish.js +155 -0
  61. data/doc/js/jquery.js +18 -0
  62. data/doc/js/navigation.js +142 -0
  63. data/doc/js/search.js +94 -0
  64. data/doc/js/search_index.js +1 -0
  65. data/doc/js/searcher.js +228 -0
  66. data/doc/rdoc.css +543 -0
  67. data/doc/table_of_contents.html +379 -0
  68. data/lib/IVLE.rb +133 -0
  69. data/lib/IVLE/api/announcement.rb +19 -0
  70. data/lib/IVLE/api/community.rb +174 -0
  71. data/lib/IVLE/api/consultation.rb +24 -0
  72. data/lib/IVLE/api/delta_datasets.rb +7 -0
  73. data/lib/IVLE/api/forum.rb +47 -0
  74. data/lib/IVLE/api/gradebook.rb +7 -0
  75. data/lib/IVLE/api/ivle_news.rb +7 -0
  76. data/lib/IVLE/api/library_ereserves.rb +11 -0
  77. data/lib/IVLE/api/login.rb +19 -0
  78. data/lib/IVLE/api/module.rb +53 -0
  79. data/lib/IVLE/api/my_organizer.rb +62 -0
  80. data/lib/IVLE/api/open_webcast_lectures.rb +13 -0
  81. data/lib/IVLE/api/poll.rb +19 -0
  82. data/lib/IVLE/api/profile.rb +7 -0
  83. data/lib/IVLE/api/rosters_and_groups.rb +78 -0
  84. data/lib/IVLE/api/student_events.rb +32 -0
  85. data/lib/IVLE/api/timetable.rb +19 -0
  86. data/lib/IVLE/api/webcast.rb +13 -0
  87. data/lib/IVLE/api/workbin.rb +11 -0
  88. data/lib/IVLE/version.rb +3 -0
  89. data/spec/api/api_spec.rb +34 -0
  90. data/spec/fixtures/api/login.html +11 -0
  91. data/spec/fixtures/api/modules.json +201 -0
  92. data/spec/fixtures/ivle.rb +7 -0
  93. data/spec/fixtures/modules.json +201 -0
  94. metadata +216 -0
@@ -0,0 +1,379 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta content="text/html; charset=IBM437" http-equiv="Content-Type">
6
+
7
+ <title>Table of Contents - RDoc Documentation</title>
8
+
9
+ <link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet">
10
+
11
+ <script type="text/javascript">
12
+ var rdoc_rel_prefix = "./";
13
+ </script>
14
+
15
+ <script type="text/javascript" charset="utf-8" src="./js/jquery.js"></script>
16
+ <script type="text/javascript" charset="utf-8" src="./js/navigation.js"></script>
17
+ <script type="text/javascript" charset="utf-8" src="./js/search_index.js"></script>
18
+ <script type="text/javascript" charset="utf-8" src="./js/search.js"></script>
19
+ <script type="text/javascript" charset="utf-8" src="./js/searcher.js"></script>
20
+ <script type="text/javascript" charset="utf-8" src="./js/darkfish.js"></script>
21
+
22
+
23
+ <body class="indexpage">
24
+ <h1>Table of Contents - RDoc Documentation</h1>
25
+
26
+ <h2>Pages</h2>
27
+ <ul>
28
+ <li class="file">
29
+ <a href="Gemfile.html">Gemfile</a>
30
+ </li>
31
+ <li class="file">
32
+ <a href="Rakefile.html">Rakefile</a>
33
+ </li>
34
+
35
+ </ul>
36
+
37
+ <h2 id="classes">Classes/Modules</h2>
38
+ <ul>
39
+ <li class="module">
40
+ <a href="IVLE.html">IVLE</a>
41
+ </li>
42
+ <li class="class">
43
+ <a href="IVLE/API.html">IVLE::API</a>
44
+ </li>
45
+ <li class="module">
46
+ <a href="IVLE/Announcement.html">IVLE::Announcement</a>
47
+ </li>
48
+ <li class="module">
49
+ <a href="IVLE/Community.html">IVLE::Community</a>
50
+ </li>
51
+ <li class="module">
52
+ <a href="IVLE/Consultation.html">IVLE::Consultation</a>
53
+ </li>
54
+ <li class="module">
55
+ <a href="IVLE/DeltaDatasets.html">IVLE::DeltaDatasets</a>
56
+ </li>
57
+ <li class="module">
58
+ <a href="IVLE/Forum.html">IVLE::Forum</a>
59
+ </li>
60
+ <li class="module">
61
+ <a href="IVLE/Gradebook.html">IVLE::Gradebook</a>
62
+ </li>
63
+ <li class="module">
64
+ <a href="IVLE/IVLEModule.html">IVLE::IVLEModule</a>
65
+ </li>
66
+ <li class="module">
67
+ <a href="IVLE/IVLENews.html">IVLE::IVLENews</a>
68
+ </li>
69
+ <li class="module">
70
+ <a href="IVLE/LibraryEReserves.html">IVLE::LibraryEReserves</a>
71
+ </li>
72
+ <li class="module">
73
+ <a href="IVLE/Login.html">IVLE::Login</a>
74
+ </li>
75
+ <li class="module">
76
+ <a href="IVLE/MyOrganizer.html">IVLE::MyOrganizer</a>
77
+ </li>
78
+ <li class="module">
79
+ <a href="IVLE/OpenWebcastLectures.html">IVLE::OpenWebcastLectures</a>
80
+ </li>
81
+ <li class="module">
82
+ <a href="IVLE/Poll.html">IVLE::Poll</a>
83
+ </li>
84
+ <li class="module">
85
+ <a href="IVLE/Profile.html">IVLE::Profile</a>
86
+ </li>
87
+ <li class="module">
88
+ <a href="IVLE/RostersAndGroups.html">IVLE::RostersAndGroups</a>
89
+ </li>
90
+ <li class="module">
91
+ <a href="IVLE/StudentEvents.html">IVLE::StudentEvents</a>
92
+ </li>
93
+ <li class="module">
94
+ <a href="IVLE/Timetable.html">IVLE::Timetable</a>
95
+ </li>
96
+ <li class="module">
97
+ <a href="IVLE/Webcast.html">IVLE::Webcast</a>
98
+ </li>
99
+ <li class="module">
100
+ <a href="IVLE/Workbin.html">IVLE::Workbin</a>
101
+ </li>
102
+ <li class="module">
103
+ <a href="Fixtures.html">Fixtures</a>
104
+ </li>
105
+ <li class="module">
106
+ <a href="Fixtures/IVLE.html">Fixtures::IVLE</a>
107
+ </li>
108
+ <li class="class">
109
+ <a href="Object.html">Object</a>
110
+ </li>
111
+
112
+ </ul>
113
+
114
+ <h2 id="methods">Methods</h2>
115
+ <ul>
116
+
117
+ <li class="method"><a href="IVLE/API.html#method-c-new">::new &mdash; IVLE::API</a>
118
+
119
+ <li class="method"><a href="IVLE.html#method-c-root">::root &mdash; IVLE</a>
120
+
121
+ <li class="method"><a href="IVLE.html#method-c-settings">::settings &mdash; IVLE</a>
122
+
123
+ <li class="method"><a href="IVLE/Announcement.html#method-i-announcement_add">#announcement_add &mdash; IVLE::Announcement</a>
124
+
125
+ <li class="method"><a href="IVLE/Announcement.html#method-i-announcement_add_log">#announcement_add_log &mdash; IVLE::Announcement</a>
126
+
127
+ <li class="method"><a href="IVLE/Announcement.html#method-i-announcements">#announcements &mdash; IVLE::Announcement</a>
128
+
129
+ <li class="method"><a href="IVLE/Announcement.html#method-i-announcements_unread">#announcements_unread &mdash; IVLE::Announcement</a>
130
+
131
+ <li class="method"><a href="IVLE/API.html#method-i-api">#api &mdash; IVLE::API</a>
132
+
133
+ <li class="method"><a href="IVLE/API.html#method-i-api_post">#api_post &mdash; IVLE::API</a>
134
+
135
+ <li class="method"><a href="IVLE/RostersAndGroups.html#method-i-class_group_sign_up">#class_group_sign_up &mdash; IVLE::RostersAndGroups</a>
136
+
137
+ <li class="method"><a href="IVLE/RostersAndGroups.html#method-i-class_group_sign_up_remove">#class_group_sign_up_remove &mdash; IVLE::RostersAndGroups</a>
138
+
139
+ <li class="method"><a href="IVLE/RostersAndGroups.html#method-i-class_roster">#class_roster &mdash; IVLE::RostersAndGroups</a>
140
+
141
+ <li class="method"><a href="IVLE/MyOrganizer.html#method-i-code_table_week_types">#code_table_week_types &mdash; IVLE::MyOrganizer</a>
142
+
143
+ <li class="method"><a href="IVLE/Community.html#method-i-communities">#communities &mdash; IVLE::Community</a>
144
+
145
+ <li class="method"><a href="IVLE/Community.html#method-i-community">#community &mdash; IVLE::Community</a>
146
+
147
+ <li class="method"><a href="IVLE/Community.html#method-i-community_add_member">#community_add_member &mdash; IVLE::Community</a>
148
+
149
+ <li class="method"><a href="IVLE/Community.html#method-i-community_announcements">#community_announcements &mdash; IVLE::Community</a>
150
+
151
+ <li class="method"><a href="IVLE/Community.html#method-i-community_categories">#community_categories &mdash; IVLE::Community</a>
152
+
153
+ <li class="method"><a href="IVLE/Community.html#method-i-community_create">#community_create &mdash; IVLE::Community</a>
154
+
155
+ <li class="method"><a href="IVLE/Community.html#method-i-community_create_comment">#community_create_comment &mdash; IVLE::Community</a>
156
+
157
+ <li class="method"><a href="IVLE/Community.html#method-i-community_create_task">#community_create_task &mdash; IVLE::Community</a>
158
+
159
+ <li class="method"><a href="IVLE/Community.html#method-i-community_delete_comment">#community_delete_comment &mdash; IVLE::Community</a>
160
+
161
+ <li class="method"><a href="IVLE/Community.html#method-i-community_delete_member">#community_delete_member &mdash; IVLE::Community</a>
162
+
163
+ <li class="method"><a href="IVLE/Community.html#method-i-community_delete_task">#community_delete_task &mdash; IVLE::Community</a>
164
+
165
+ <li class="method"><a href="IVLE/Community.html#method-i-community_forum_add_log_by_post">#community_forum_add_log_by_post &mdash; IVLE::Community</a>
166
+
167
+ <li class="method"><a href="IVLE/Community.html#method-i-community_forum_headings">#community_forum_headings &mdash; IVLE::Community</a>
168
+
169
+ <li class="method"><a href="IVLE/Community.html#method-i-community_forum_new_topic">#community_forum_new_topic &mdash; IVLE::Community</a>
170
+
171
+ <li class="method"><a href="IVLE/Community.html#method-i-community_forum_posts">#community_forum_posts &mdash; IVLE::Community</a>
172
+
173
+ <li class="method"><a href="IVLE/Community.html#method-i-community_forum_reply_post">#community_forum_reply_post &mdash; IVLE::Community</a>
174
+
175
+ <li class="method"><a href="IVLE/Community.html#method-i-community_get_all_comments">#community_get_all_comments &mdash; IVLE::Community</a>
176
+
177
+ <li class="method"><a href="IVLE/Community.html#method-i-community_get_all_tasks">#community_get_all_tasks &mdash; IVLE::Community</a>
178
+
179
+ <li class="method"><a href="IVLE/Community.html#method-i-community_get_comment">#community_get_comment &mdash; IVLE::Community</a>
180
+
181
+ <li class="method"><a href="IVLE/Community.html#method-i-community_get_sub_task">#community_get_sub_task &mdash; IVLE::Community</a>
182
+
183
+ <li class="method"><a href="IVLE/Community.html#method-i-community_get_task">#community_get_task &mdash; IVLE::Community</a>
184
+
185
+ <li class="method"><a href="IVLE/Community.html#method-i-community_join">#community_join &mdash; IVLE::Community</a>
186
+
187
+ <li class="method"><a href="IVLE/Community.html#method-i-community_members">#community_members &mdash; IVLE::Community</a>
188
+
189
+ <li class="method"><a href="IVLE/Community.html#method-i-community_quit">#community_quit &mdash; IVLE::Community</a>
190
+
191
+ <li class="method"><a href="IVLE/Community.html#method-i-community_search">#community_search &mdash; IVLE::Community</a>
192
+
193
+ <li class="method"><a href="IVLE/Community.html#method-i-community_tags">#community_tags &mdash; IVLE::Community</a>
194
+
195
+ <li class="method"><a href="IVLE/Community.html#method-i-community_update">#community_update &mdash; IVLE::Community</a>
196
+
197
+ <li class="method"><a href="IVLE/Community.html#method-i-community_update_comment">#community_update_comment &mdash; IVLE::Community</a>
198
+
199
+ <li class="method"><a href="IVLE/Community.html#method-i-community_update_member">#community_update_member &mdash; IVLE::Community</a>
200
+
201
+ <li class="method"><a href="IVLE/Community.html#method-i-community_update_task">#community_update_task &mdash; IVLE::Community</a>
202
+
203
+ <li class="method"><a href="IVLE/Community.html#method-i-community_weblinks">#community_weblinks &mdash; IVLE::Community</a>
204
+
205
+ <li class="method"><a href="IVLE/Community.html#method-i-community_workbin_files">#community_workbin_files &mdash; IVLE::Community</a>
206
+
207
+ <li class="method"><a href="IVLE/Community.html#method-i-community_workbin_folders">#community_workbin_folders &mdash; IVLE::Community</a>
208
+
209
+ <li class="method"><a href="IVLE/Consultation.html#method-i-consultation_cancel_slot">#consultation_cancel_slot &mdash; IVLE::Consultation</a>
210
+
211
+ <li class="method"><a href="IVLE/Consultation.html#method-i-consultation_module_facilitators_with_slots">#consultation_module_facilitators_with_slots &mdash; IVLE::Consultation</a>
212
+
213
+ <li class="method"><a href="IVLE/Consultation.html#method-i-consultation_sign_up">#consultation_sign_up &mdash; IVLE::Consultation</a>
214
+
215
+ <li class="method"><a href="IVLE/Consultation.html#method-i-consultation_signed_up_slots">#consultation_signed_up_slots &mdash; IVLE::Consultation</a>
216
+
217
+ <li class="method"><a href="IVLE/Consultation.html#method-i-consultation_slots">#consultation_slots &mdash; IVLE::Consultation</a>
218
+
219
+ <li class="method"><a href="IVLE/DeltaDatasets.html#method-i-delta_module_timetable">#delta_module_timetable &mdash; IVLE::DeltaDatasets</a>
220
+
221
+ <li class="method"><a href="IVLE/Community.html#method-i-download_file">#download_file &mdash; IVLE::Community</a>
222
+
223
+ <li class="method"><a href="IVLE/Workbin.html#method-i-download_file">#download_file &mdash; IVLE::Workbin</a>
224
+
225
+ <li class="method"><a href="IVLE/Forum.html#method-i-forum">#forum &mdash; IVLE::Forum</a>
226
+
227
+ <li class="method"><a href="IVLE/Forum.html#method-i-forum_heading_threads">#forum_heading_threads &mdash; IVLE::Forum</a>
228
+
229
+ <li class="method"><a href="IVLE/Forum.html#method-i-forum_headings">#forum_headings &mdash; IVLE::Forum</a>
230
+
231
+ <li class="method"><a href="IVLE/Forum.html#method-i-forum_post_new_thread">#forum_post_new_thread &mdash; IVLE::Forum</a>
232
+
233
+ <li class="method"><a href="IVLE/Forum.html#method-i-forum_reply_thread">#forum_reply_thread &mdash; IVLE::Forum</a>
234
+
235
+ <li class="method"><a href="IVLE/Forum.html#method-i-forum_sale_of_used_textbooks">#forum_sale_of_used_textbooks &mdash; IVLE::Forum</a>
236
+
237
+ <li class="method"><a href="IVLE/Forum.html#method-i-forum_student_feedback">#forum_student_feedback &mdash; IVLE::Forum</a>
238
+
239
+ <li class="method"><a href="IVLE/Forum.html#method-i-forum_thread">#forum_thread &mdash; IVLE::Forum</a>
240
+
241
+ <li class="method"><a href="IVLE/Forum.html#method-i-forum_thread_add_log">#forum_thread_add_log &mdash; IVLE::Forum</a>
242
+
243
+ <li class="method"><a href="IVLE/Forum.html#method-i-forum_threads">#forum_threads &mdash; IVLE::Forum</a>
244
+
245
+ <li class="method"><a href="IVLE/Forum.html#method-i-forums">#forums &mdash; IVLE::Forum</a>
246
+
247
+ <li class="method"><a href="IVLE/RostersAndGroups.html#method-i-group_projects_by_user">#group_projects_by_user &mdash; IVLE::RostersAndGroups</a>
248
+
249
+ <li class="method"><a href="IVLE/RostersAndGroups.html#method-i-groups_by_user">#groups_by_user &mdash; IVLE::RostersAndGroups</a>
250
+
251
+ <li class="method"><a href="IVLE/RostersAndGroups.html#method-i-groups_by_user_and_module">#groups_by_user_and_module &mdash; IVLE::RostersAndGroups</a>
252
+
253
+ <li class="method"><a href="IVLE/RostersAndGroups.html#method-i-guest_roster">#guest_roster &mdash; IVLE::RostersAndGroups</a>
254
+
255
+ <li class="method"><a href="IVLE/LibraryEReserves.html#method-i-lib_ereserve_files">#lib_ereserve_files &mdash; IVLE::LibraryEReserves</a>
256
+
257
+ <li class="method"><a href="IVLE/LibraryEReserves.html#method-i-lib_ereserves">#lib_ereserves &mdash; IVLE::LibraryEReserves</a>
258
+
259
+ <li class="method"><a href="IVLE/IVLEModule.html#method-i-module">#module &mdash; IVLE::IVLEModule</a>
260
+
261
+ <li class="method"><a href="IVLE/RostersAndGroups.html#method-i-module_class_group_users">#module_class_group_users &mdash; IVLE::RostersAndGroups</a>
262
+
263
+ <li class="method"><a href="IVLE/RostersAndGroups.html#method-i-module_class_groups">#module_class_groups &mdash; IVLE::RostersAndGroups</a>
264
+
265
+ <li class="method"><a href="IVLE/IVLEModule.html#method-i-module_information">#module_information &mdash; IVLE::IVLEModule</a>
266
+
267
+ <li class="method"><a href="IVLE/IVLEModule.html#method-i-module_lecturers">#module_lecturers &mdash; IVLE::IVLEModule</a>
268
+
269
+ <li class="method"><a href="IVLE/RostersAndGroups.html#method-i-module_official_group_users">#module_official_group_users &mdash; IVLE::RostersAndGroups</a>
270
+
271
+ <li class="method"><a href="IVLE/IVLEModule.html#method-i-module_reading">#module_reading &mdash; IVLE::IVLEModule</a>
272
+
273
+ <li class="method"><a href="IVLE/IVLEModule.html#method-i-module_reading_formatted">#module_reading_formatted &mdash; IVLE::IVLEModule</a>
274
+
275
+ <li class="method"><a href="IVLE/IVLEModule.html#method-i-module_reading_unformatted">#module_reading_unformatted &mdash; IVLE::IVLEModule</a>
276
+
277
+ <li class="method"><a href="IVLE/IVLEModule.html#method-i-module_weblinks">#module_weblinks &mdash; IVLE::IVLEModule</a>
278
+
279
+ <li class="method"><a href="IVLE/IVLEModule.html#method-i-modules">#modules &mdash; IVLE::IVLEModule</a>
280
+
281
+ <li class="method"><a href="IVLE/IVLEModule.html#method-i-modules_search">#modules_search &mdash; IVLE::IVLEModule</a>
282
+
283
+ <li class="method"><a href="IVLE/IVLEModule.html#method-i-modules_staff">#modules_staff &mdash; IVLE::IVLEModule</a>
284
+
285
+ <li class="method"><a href="IVLE/IVLEModule.html#method-i-modules_student">#modules_student &mdash; IVLE::IVLEModule</a>
286
+
287
+ <li class="method"><a href="IVLE/IVLEModule.html#method-i-modules_taken">#modules_taken &mdash; IVLE::IVLEModule</a>
288
+
289
+ <li class="method"><a href="IVLE/MyOrganizer.html#method-i-my_organizer_acad_semester_info">#my_organizer_acad_semester_info &mdash; IVLE::MyOrganizer</a>
290
+
291
+ <li class="method"><a href="IVLE/MyOrganizer.html#method-i-my_organizer_add_personal_event">#my_organizer_add_personal_event &mdash; IVLE::MyOrganizer</a>
292
+
293
+ <li class="method"><a href="IVLE/MyOrganizer.html#method-i-my_organizer_delete_personal_event">#my_organizer_delete_personal_event &mdash; IVLE::MyOrganizer</a>
294
+
295
+ <li class="method"><a href="IVLE/MyOrganizer.html#method-i-my_organizer_events">#my_organizer_events &mdash; IVLE::MyOrganizer</a>
296
+
297
+ <li class="method"><a href="IVLE/MyOrganizer.html#method-i-my_organizer_ivle">#my_organizer_ivle &mdash; IVLE::MyOrganizer</a>
298
+
299
+ <li class="method"><a href="IVLE/MyOrganizer.html#method-i-my_organizer_personal">#my_organizer_personal &mdash; IVLE::MyOrganizer</a>
300
+
301
+ <li class="method"><a href="IVLE/MyOrganizer.html#method-i-my_organizer_special_days">#my_organizer_special_days &mdash; IVLE::MyOrganizer</a>
302
+
303
+ <li class="method"><a href="IVLE/MyOrganizer.html#method-i-my_organizer_update_personal_event">#my_organizer_update_personal_event &mdash; IVLE::MyOrganizer</a>
304
+
305
+ <li class="method"><a href="IVLE/OpenWebcastLectures.html#method-i-open_webcast_add_log">#open_webcast_add_log &mdash; IVLE::OpenWebcastLectures</a>
306
+
307
+ <li class="method"><a href="IVLE/OpenWebcastLectures.html#method-i-open_webcasts">#open_webcasts &mdash; IVLE::OpenWebcastLectures</a>
308
+
309
+ <li class="method"><a href="IVLE/Poll.html#method-i-poll_get_voted_user">#poll_get_voted_user &mdash; IVLE::Poll</a>
310
+
311
+ <li class="method"><a href="IVLE/Poll.html#method-i-poll_get_voted_user_other">#poll_get_voted_user_other &mdash; IVLE::Poll</a>
312
+
313
+ <li class="method"><a href="IVLE/Poll.html#method-i-poll_submit_vote">#poll_submit_vote &mdash; IVLE::Poll</a>
314
+
315
+ <li class="method"><a href="IVLE/Poll.html#method-i-polls">#polls &mdash; IVLE::Poll</a>
316
+
317
+ <li class="method"><a href="IVLE/Profile.html#method-i-profile_view">#profile_view &mdash; IVLE::Profile</a>
318
+
319
+ <li class="method"><a href="IVLE/RostersAndGroups.html#method-i-project_enrolled_groups">#project_enrolled_groups &mdash; IVLE::RostersAndGroups</a>
320
+
321
+ <li class="method"><a href="IVLE/RostersAndGroups.html#method-i-project_group_remove_sign_up">#project_group_remove_sign_up &mdash; IVLE::RostersAndGroups</a>
322
+
323
+ <li class="method"><a href="IVLE/RostersAndGroups.html#method-i-project_group_sign_up">#project_group_sign_up &mdash; IVLE::RostersAndGroups</a>
324
+
325
+ <li class="method"><a href="IVLE/RostersAndGroups.html#method-i-project_group_users">#project_group_users &mdash; IVLE::RostersAndGroups</a>
326
+
327
+ <li class="method"><a href="IVLE/RostersAndGroups.html#method-i-project_self_enrol_groups">#project_self_enrol_groups &mdash; IVLE::RostersAndGroups</a>
328
+
329
+ <li class="method"><a href="IVLE/IVLENews.html#method-i-public_news">#public_news &mdash; IVLE::IVLENews</a>
330
+
331
+ <li class="method"><a href="Fixtures/IVLE.html#method-i-read_fixture">#read_fixture &mdash; Fixtures::IVLE</a>
332
+
333
+ <li class="method"><a href="IVLE/StudentEvents.html#method-i-student_event_post_new_event">#student_event_post_new_event &mdash; IVLE::StudentEvents</a>
334
+
335
+ <li class="method"><a href="IVLE/StudentEvents.html#method-i-student_events">#student_events &mdash; IVLE::StudentEvents</a>
336
+
337
+ <li class="method"><a href="IVLE/StudentEvents.html#method-i-student_events_categories">#student_events_categories &mdash; IVLE::StudentEvents</a>
338
+
339
+ <li class="method"><a href="IVLE/StudentEvents.html#method-i-student_events_category">#student_events_category &mdash; IVLE::StudentEvents</a>
340
+
341
+ <li class="method"><a href="IVLE/StudentEvents.html#method-i-student_events_committee">#student_events_committee &mdash; IVLE::StudentEvents</a>
342
+
343
+ <li class="method"><a href="IVLE/StudentEvents.html#method-i-student_events_committees">#student_events_committees &mdash; IVLE::StudentEvents</a>
344
+
345
+ <li class="method"><a href="IVLE/Timetable.html#method-i-timetable_module">#timetable_module &mdash; IVLE::Timetable</a>
346
+
347
+ <li class="method"><a href="IVLE/Timetable.html#method-i-timetable_module_exam">#timetable_module_exam &mdash; IVLE::Timetable</a>
348
+
349
+ <li class="method"><a href="IVLE/MyOrganizer.html#method-i-timetable_student">#timetable_student &mdash; IVLE::MyOrganizer</a>
350
+
351
+ <li class="method"><a href="IVLE/Timetable.html#method-i-timetable_student">#timetable_student &mdash; IVLE::Timetable</a>
352
+
353
+ <li class="method"><a href="IVLE/Timetable.html#method-i-timetable_student_module">#timetable_student_module &mdash; IVLE::Timetable</a>
354
+
355
+ <li class="method"><a href="IVLE/Login.html#method-i-useremail_get">#useremail_get &mdash; IVLE::Login</a>
356
+
357
+ <li class="method"><a href="IVLE/Login.html#method-i-userid_get">#userid_get &mdash; IVLE::Login</a>
358
+
359
+ <li class="method"><a href="IVLE/Login.html#method-i-username_get">#username_get &mdash; IVLE::Login</a>
360
+
361
+ <li class="method"><a href="IVLE/Login.html#method-i-validate">#validate &mdash; IVLE::Login</a>
362
+
363
+ <li class="method"><a href="IVLE/Webcast.html#method-i-webcast_add_log">#webcast_add_log &mdash; IVLE::Webcast</a>
364
+
365
+ <li class="method"><a href="IVLE/Webcast.html#method-i-webcasts">#webcasts &mdash; IVLE::Webcast</a>
366
+
367
+ <li class="method"><a href="IVLE/Workbin.html#method-i-workbins">#workbins &mdash; IVLE::Workbin</a>
368
+
369
+ <li class="method"><a href="IVLE/Gradebook.html#method-i-workbins">#workbins &mdash; IVLE::Gradebook</a>
370
+
371
+ </ul>
372
+
373
+
374
+ <footer id="validator-badges">
375
+ <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
376
+ <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.1.
377
+ <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
378
+ </footer>
379
+
@@ -0,0 +1,133 @@
1
+ require 'IVLE/version'
2
+ require 'nokogiri'
3
+ require 'mechanize'
4
+ require 'faraday'
5
+ require 'faraday_middleware'
6
+
7
+ require 'IVLE/api/module'
8
+ require 'IVLE/api/login'
9
+ require 'IVLE/api/consultation'
10
+ require 'IVLE/api/rosters_and_groups'
11
+ require 'IVLE/api/announcement'
12
+ require 'IVLE/api/forum'
13
+ require 'IVLE/api/webcast'
14
+ require 'IVLE/api/poll'
15
+ require 'IVLE/api/workbin'
16
+ require 'IVLE/api/gradebook'
17
+ require 'IVLE/api/library_ereserves'
18
+ require 'IVLE/api/my_organizer'
19
+ require 'IVLE/api/community'
20
+ require 'IVLE/api/open_webcast_lectures'
21
+ require 'IVLE/api/student_events'
22
+ require 'IVLE/api/ivle_news'
23
+ require 'IVLE/api/timetable'
24
+ require 'IVLE/api/delta_datasets'
25
+ require 'IVLE/api/profile'
26
+
27
+ module IVLE
28
+ class << self
29
+ def root
30
+ File.expand_path '../..', __FILE__
31
+ end
32
+
33
+ def settings
34
+ @@settings ||= YAML::load(File.open(File.join(self.root, 'config', 'settings.yml')))
35
+ end
36
+ end
37
+
38
+ class API
39
+ # Some are plural -- blame the docs
40
+ include IVLE::Login
41
+ include IVLE::IVLEModule
42
+ include IVLE::Consultation
43
+ include IVLE::RostersAndGroups
44
+ include IVLE::Announcement
45
+ include IVLE::Forum
46
+ include IVLE::Webcast
47
+ include IVLE::Poll
48
+ include IVLE::Workbin
49
+ include IVLE::Gradebook
50
+ include IVLE::LibraryEReserves
51
+ include IVLE::MyOrganizer
52
+ include IVLE::Community
53
+ include IVLE::OpenWebcastLectures
54
+ include IVLE::StudentEvents
55
+ include IVLE::IVLENews
56
+ include IVLE::Timetable
57
+ include IVLE::DeltaDatasets
58
+ include IVLE::Profile
59
+
60
+ attr_accessor :api_key, :username, :password
61
+
62
+ def initialize(*args)
63
+ self.api_key = args[0]
64
+
65
+ if args.size == 2
66
+ @access_token = args[1]
67
+ elsif args.size == 3
68
+ self.username = args[1]
69
+ self.password = args[2]
70
+ else
71
+ raise ArgumentError "Expected 2 or 3 arguments, got #{args.size}"
72
+ end
73
+ end
74
+
75
+ # I don't trust the API documentation so this is now public.
76
+ # Call this yourself if my implementation fails.
77
+ def api(method, params={}, verb=:get, add_auth=true)
78
+ params = add_auth(params) if add_auth
79
+ resp = client.send(verb, "api/Lapi.svc/#{method}", params)
80
+ format_response(resp.body)
81
+ end
82
+
83
+ def api_post(method, params={})
84
+ api(method, params, :post)
85
+ end
86
+
87
+ private
88
+
89
+ def access_token
90
+ # Seriously IVLE, implement proper oAuth
91
+ # Who did you even enslave to make this
92
+
93
+ @access_token ||= begin
94
+ agent = Mechanize.new { |a| a.verify_mode = OpenSSL::SSL::VERIFY_NONE unless IVLE.settings[:verify_ssl] }
95
+ page = agent.get("https://ivle.nus.edu.sg/api/login?apikey=#{api_key}&url=")
96
+
97
+ form = page.form_with(name: 'frm') do |f|
98
+ f.field_with(name: 'userid').value = self.username
99
+ f.field_with(name: 'password').value = self.password
100
+ end
101
+
102
+ form.submit.body
103
+ end
104
+ end
105
+
106
+ def client
107
+ options = {
108
+ url: 'https://ivle.nus.edu.sg/',
109
+ ssl: { verify: IVLE.settings[:verify_ssl] }
110
+ }
111
+
112
+ @client ||= Faraday.new(options) do |faraday|
113
+ faraday.request :json # convert POST params to JSON
114
+ faraday.response :logger if IVLE.settings[:faraday_log] # log requests to STDOUT
115
+ faraday.adapter Faraday.default_adapter # make requests with Net::HTTP
116
+ end
117
+ end
118
+
119
+ def add_auth(params)
120
+ default_params = { apikey: api_key, authtoken: access_token }
121
+ default_params.merge(params)
122
+ end
123
+
124
+ def format_response(body)
125
+ # Documentation does not represent production (really!?), so we play it safe here
126
+ JSON.parse(body, symbolize_names: true)
127
+ rescue
128
+ Nokogiri::XML(body).root.element_children.each_with_object({}) do |e, h|
129
+ h[e.name.to_sym] = e.content
130
+ end
131
+ end
132
+ end
133
+ end