IVLE 0.0.1
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/.gitignore +4 -0
- data/Gemfile +4 -0
- data/IVLE.gemspec +29 -0
- data/LICENSE +7 -0
- data/README.md +61 -0
- data/Rakefile +1 -0
- data/config/settings.yml +2 -0
- data/doc/Fixtures.html +167 -0
- data/doc/Fixtures/IVLE.html +213 -0
- data/doc/Gemfile.html +133 -0
- data/doc/IVLE.html +278 -0
- data/doc/IVLE/API.html +424 -0
- data/doc/IVLE/Announcement.html +309 -0
- data/doc/IVLE/Community.html +1305 -0
- data/doc/IVLE/Consultation.html +342 -0
- data/doc/IVLE/DeltaDatasets.html +213 -0
- data/doc/IVLE/Forum.html +533 -0
- data/doc/IVLE/Gradebook.html +213 -0
- data/doc/IVLE/IVLEModule.html +567 -0
- data/doc/IVLE/IVLENews.html +213 -0
- data/doc/IVLE/LibraryEReserves.html +245 -0
- data/doc/IVLE/Login.html +309 -0
- data/doc/IVLE/MyOrganizer.html +520 -0
- data/doc/IVLE/OpenWebcastLectures.html +247 -0
- data/doc/IVLE/Poll.html +309 -0
- data/doc/IVLE/Profile.html +213 -0
- data/doc/IVLE/RostersAndGroups.html +676 -0
- data/doc/IVLE/StudentEvents.html +378 -0
- data/doc/IVLE/Timetable.html +309 -0
- data/doc/IVLE/Webcast.html +247 -0
- data/doc/IVLE/Workbin.html +245 -0
- data/doc/Object.html +185 -0
- data/doc/Rakefile.html +131 -0
- data/doc/created.rid +26 -0
- data/doc/images/add.png +0 -0
- data/doc/images/brick.png +0 -0
- data/doc/images/brick_link.png +0 -0
- data/doc/images/bug.png +0 -0
- data/doc/images/bullet_black.png +0 -0
- data/doc/images/bullet_toggle_minus.png +0 -0
- data/doc/images/bullet_toggle_plus.png +0 -0
- data/doc/images/date.png +0 -0
- data/doc/images/delete.png +0 -0
- data/doc/images/find.png +0 -0
- data/doc/images/loadingAnimation.gif +0 -0
- data/doc/images/macFFBgHack.png +0 -0
- data/doc/images/package.png +0 -0
- data/doc/images/page_green.png +0 -0
- data/doc/images/page_white_text.png +0 -0
- data/doc/images/page_white_width.png +0 -0
- data/doc/images/plugin.png +0 -0
- data/doc/images/ruby.png +0 -0
- data/doc/images/tag_blue.png +0 -0
- data/doc/images/tag_green.png +0 -0
- data/doc/images/transparent.png +0 -0
- data/doc/images/wrench.png +0 -0
- data/doc/images/wrench_orange.png +0 -0
- data/doc/images/zoom.png +0 -0
- data/doc/index.html +126 -0
- data/doc/js/darkfish.js +155 -0
- data/doc/js/jquery.js +18 -0
- data/doc/js/navigation.js +142 -0
- data/doc/js/search.js +94 -0
- data/doc/js/search_index.js +1 -0
- data/doc/js/searcher.js +228 -0
- data/doc/rdoc.css +543 -0
- data/doc/table_of_contents.html +379 -0
- data/lib/IVLE.rb +133 -0
- data/lib/IVLE/api/announcement.rb +19 -0
- data/lib/IVLE/api/community.rb +174 -0
- data/lib/IVLE/api/consultation.rb +24 -0
- data/lib/IVLE/api/delta_datasets.rb +7 -0
- data/lib/IVLE/api/forum.rb +47 -0
- data/lib/IVLE/api/gradebook.rb +7 -0
- data/lib/IVLE/api/ivle_news.rb +7 -0
- data/lib/IVLE/api/library_ereserves.rb +11 -0
- data/lib/IVLE/api/login.rb +19 -0
- data/lib/IVLE/api/module.rb +53 -0
- data/lib/IVLE/api/my_organizer.rb +62 -0
- data/lib/IVLE/api/open_webcast_lectures.rb +13 -0
- data/lib/IVLE/api/poll.rb +19 -0
- data/lib/IVLE/api/profile.rb +7 -0
- data/lib/IVLE/api/rosters_and_groups.rb +78 -0
- data/lib/IVLE/api/student_events.rb +32 -0
- data/lib/IVLE/api/timetable.rb +19 -0
- data/lib/IVLE/api/webcast.rb +13 -0
- data/lib/IVLE/api/workbin.rb +11 -0
- data/lib/IVLE/version.rb +3 -0
- data/spec/api/api_spec.rb +34 -0
- data/spec/fixtures/api/login.html +11 -0
- data/spec/fixtures/api/modules.json +201 -0
- data/spec/fixtures/ivle.rb +7 -0
- data/spec/fixtures/modules.json +201 -0
- 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 — IVLE::API</a>
|
118
|
+
|
119
|
+
<li class="method"><a href="IVLE.html#method-c-root">::root — IVLE</a>
|
120
|
+
|
121
|
+
<li class="method"><a href="IVLE.html#method-c-settings">::settings — IVLE</a>
|
122
|
+
|
123
|
+
<li class="method"><a href="IVLE/Announcement.html#method-i-announcement_add">#announcement_add — IVLE::Announcement</a>
|
124
|
+
|
125
|
+
<li class="method"><a href="IVLE/Announcement.html#method-i-announcement_add_log">#announcement_add_log — IVLE::Announcement</a>
|
126
|
+
|
127
|
+
<li class="method"><a href="IVLE/Announcement.html#method-i-announcements">#announcements — IVLE::Announcement</a>
|
128
|
+
|
129
|
+
<li class="method"><a href="IVLE/Announcement.html#method-i-announcements_unread">#announcements_unread — IVLE::Announcement</a>
|
130
|
+
|
131
|
+
<li class="method"><a href="IVLE/API.html#method-i-api">#api — IVLE::API</a>
|
132
|
+
|
133
|
+
<li class="method"><a href="IVLE/API.html#method-i-api_post">#api_post — IVLE::API</a>
|
134
|
+
|
135
|
+
<li class="method"><a href="IVLE/RostersAndGroups.html#method-i-class_group_sign_up">#class_group_sign_up — 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 — IVLE::RostersAndGroups</a>
|
138
|
+
|
139
|
+
<li class="method"><a href="IVLE/RostersAndGroups.html#method-i-class_roster">#class_roster — IVLE::RostersAndGroups</a>
|
140
|
+
|
141
|
+
<li class="method"><a href="IVLE/MyOrganizer.html#method-i-code_table_week_types">#code_table_week_types — IVLE::MyOrganizer</a>
|
142
|
+
|
143
|
+
<li class="method"><a href="IVLE/Community.html#method-i-communities">#communities — IVLE::Community</a>
|
144
|
+
|
145
|
+
<li class="method"><a href="IVLE/Community.html#method-i-community">#community — IVLE::Community</a>
|
146
|
+
|
147
|
+
<li class="method"><a href="IVLE/Community.html#method-i-community_add_member">#community_add_member — IVLE::Community</a>
|
148
|
+
|
149
|
+
<li class="method"><a href="IVLE/Community.html#method-i-community_announcements">#community_announcements — IVLE::Community</a>
|
150
|
+
|
151
|
+
<li class="method"><a href="IVLE/Community.html#method-i-community_categories">#community_categories — IVLE::Community</a>
|
152
|
+
|
153
|
+
<li class="method"><a href="IVLE/Community.html#method-i-community_create">#community_create — IVLE::Community</a>
|
154
|
+
|
155
|
+
<li class="method"><a href="IVLE/Community.html#method-i-community_create_comment">#community_create_comment — IVLE::Community</a>
|
156
|
+
|
157
|
+
<li class="method"><a href="IVLE/Community.html#method-i-community_create_task">#community_create_task — IVLE::Community</a>
|
158
|
+
|
159
|
+
<li class="method"><a href="IVLE/Community.html#method-i-community_delete_comment">#community_delete_comment — IVLE::Community</a>
|
160
|
+
|
161
|
+
<li class="method"><a href="IVLE/Community.html#method-i-community_delete_member">#community_delete_member — IVLE::Community</a>
|
162
|
+
|
163
|
+
<li class="method"><a href="IVLE/Community.html#method-i-community_delete_task">#community_delete_task — 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 — IVLE::Community</a>
|
166
|
+
|
167
|
+
<li class="method"><a href="IVLE/Community.html#method-i-community_forum_headings">#community_forum_headings — IVLE::Community</a>
|
168
|
+
|
169
|
+
<li class="method"><a href="IVLE/Community.html#method-i-community_forum_new_topic">#community_forum_new_topic — IVLE::Community</a>
|
170
|
+
|
171
|
+
<li class="method"><a href="IVLE/Community.html#method-i-community_forum_posts">#community_forum_posts — IVLE::Community</a>
|
172
|
+
|
173
|
+
<li class="method"><a href="IVLE/Community.html#method-i-community_forum_reply_post">#community_forum_reply_post — IVLE::Community</a>
|
174
|
+
|
175
|
+
<li class="method"><a href="IVLE/Community.html#method-i-community_get_all_comments">#community_get_all_comments — IVLE::Community</a>
|
176
|
+
|
177
|
+
<li class="method"><a href="IVLE/Community.html#method-i-community_get_all_tasks">#community_get_all_tasks — IVLE::Community</a>
|
178
|
+
|
179
|
+
<li class="method"><a href="IVLE/Community.html#method-i-community_get_comment">#community_get_comment — IVLE::Community</a>
|
180
|
+
|
181
|
+
<li class="method"><a href="IVLE/Community.html#method-i-community_get_sub_task">#community_get_sub_task — IVLE::Community</a>
|
182
|
+
|
183
|
+
<li class="method"><a href="IVLE/Community.html#method-i-community_get_task">#community_get_task — IVLE::Community</a>
|
184
|
+
|
185
|
+
<li class="method"><a href="IVLE/Community.html#method-i-community_join">#community_join — IVLE::Community</a>
|
186
|
+
|
187
|
+
<li class="method"><a href="IVLE/Community.html#method-i-community_members">#community_members — IVLE::Community</a>
|
188
|
+
|
189
|
+
<li class="method"><a href="IVLE/Community.html#method-i-community_quit">#community_quit — IVLE::Community</a>
|
190
|
+
|
191
|
+
<li class="method"><a href="IVLE/Community.html#method-i-community_search">#community_search — IVLE::Community</a>
|
192
|
+
|
193
|
+
<li class="method"><a href="IVLE/Community.html#method-i-community_tags">#community_tags — IVLE::Community</a>
|
194
|
+
|
195
|
+
<li class="method"><a href="IVLE/Community.html#method-i-community_update">#community_update — IVLE::Community</a>
|
196
|
+
|
197
|
+
<li class="method"><a href="IVLE/Community.html#method-i-community_update_comment">#community_update_comment — IVLE::Community</a>
|
198
|
+
|
199
|
+
<li class="method"><a href="IVLE/Community.html#method-i-community_update_member">#community_update_member — IVLE::Community</a>
|
200
|
+
|
201
|
+
<li class="method"><a href="IVLE/Community.html#method-i-community_update_task">#community_update_task — IVLE::Community</a>
|
202
|
+
|
203
|
+
<li class="method"><a href="IVLE/Community.html#method-i-community_weblinks">#community_weblinks — IVLE::Community</a>
|
204
|
+
|
205
|
+
<li class="method"><a href="IVLE/Community.html#method-i-community_workbin_files">#community_workbin_files — IVLE::Community</a>
|
206
|
+
|
207
|
+
<li class="method"><a href="IVLE/Community.html#method-i-community_workbin_folders">#community_workbin_folders — IVLE::Community</a>
|
208
|
+
|
209
|
+
<li class="method"><a href="IVLE/Consultation.html#method-i-consultation_cancel_slot">#consultation_cancel_slot — 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 — IVLE::Consultation</a>
|
212
|
+
|
213
|
+
<li class="method"><a href="IVLE/Consultation.html#method-i-consultation_sign_up">#consultation_sign_up — IVLE::Consultation</a>
|
214
|
+
|
215
|
+
<li class="method"><a href="IVLE/Consultation.html#method-i-consultation_signed_up_slots">#consultation_signed_up_slots — IVLE::Consultation</a>
|
216
|
+
|
217
|
+
<li class="method"><a href="IVLE/Consultation.html#method-i-consultation_slots">#consultation_slots — IVLE::Consultation</a>
|
218
|
+
|
219
|
+
<li class="method"><a href="IVLE/DeltaDatasets.html#method-i-delta_module_timetable">#delta_module_timetable — IVLE::DeltaDatasets</a>
|
220
|
+
|
221
|
+
<li class="method"><a href="IVLE/Community.html#method-i-download_file">#download_file — IVLE::Community</a>
|
222
|
+
|
223
|
+
<li class="method"><a href="IVLE/Workbin.html#method-i-download_file">#download_file — IVLE::Workbin</a>
|
224
|
+
|
225
|
+
<li class="method"><a href="IVLE/Forum.html#method-i-forum">#forum — IVLE::Forum</a>
|
226
|
+
|
227
|
+
<li class="method"><a href="IVLE/Forum.html#method-i-forum_heading_threads">#forum_heading_threads — IVLE::Forum</a>
|
228
|
+
|
229
|
+
<li class="method"><a href="IVLE/Forum.html#method-i-forum_headings">#forum_headings — IVLE::Forum</a>
|
230
|
+
|
231
|
+
<li class="method"><a href="IVLE/Forum.html#method-i-forum_post_new_thread">#forum_post_new_thread — IVLE::Forum</a>
|
232
|
+
|
233
|
+
<li class="method"><a href="IVLE/Forum.html#method-i-forum_reply_thread">#forum_reply_thread — 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 — IVLE::Forum</a>
|
236
|
+
|
237
|
+
<li class="method"><a href="IVLE/Forum.html#method-i-forum_student_feedback">#forum_student_feedback — IVLE::Forum</a>
|
238
|
+
|
239
|
+
<li class="method"><a href="IVLE/Forum.html#method-i-forum_thread">#forum_thread — IVLE::Forum</a>
|
240
|
+
|
241
|
+
<li class="method"><a href="IVLE/Forum.html#method-i-forum_thread_add_log">#forum_thread_add_log — IVLE::Forum</a>
|
242
|
+
|
243
|
+
<li class="method"><a href="IVLE/Forum.html#method-i-forum_threads">#forum_threads — IVLE::Forum</a>
|
244
|
+
|
245
|
+
<li class="method"><a href="IVLE/Forum.html#method-i-forums">#forums — IVLE::Forum</a>
|
246
|
+
|
247
|
+
<li class="method"><a href="IVLE/RostersAndGroups.html#method-i-group_projects_by_user">#group_projects_by_user — IVLE::RostersAndGroups</a>
|
248
|
+
|
249
|
+
<li class="method"><a href="IVLE/RostersAndGroups.html#method-i-groups_by_user">#groups_by_user — 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 — IVLE::RostersAndGroups</a>
|
252
|
+
|
253
|
+
<li class="method"><a href="IVLE/RostersAndGroups.html#method-i-guest_roster">#guest_roster — IVLE::RostersAndGroups</a>
|
254
|
+
|
255
|
+
<li class="method"><a href="IVLE/LibraryEReserves.html#method-i-lib_ereserve_files">#lib_ereserve_files — IVLE::LibraryEReserves</a>
|
256
|
+
|
257
|
+
<li class="method"><a href="IVLE/LibraryEReserves.html#method-i-lib_ereserves">#lib_ereserves — IVLE::LibraryEReserves</a>
|
258
|
+
|
259
|
+
<li class="method"><a href="IVLE/IVLEModule.html#method-i-module">#module — IVLE::IVLEModule</a>
|
260
|
+
|
261
|
+
<li class="method"><a href="IVLE/RostersAndGroups.html#method-i-module_class_group_users">#module_class_group_users — IVLE::RostersAndGroups</a>
|
262
|
+
|
263
|
+
<li class="method"><a href="IVLE/RostersAndGroups.html#method-i-module_class_groups">#module_class_groups — IVLE::RostersAndGroups</a>
|
264
|
+
|
265
|
+
<li class="method"><a href="IVLE/IVLEModule.html#method-i-module_information">#module_information — IVLE::IVLEModule</a>
|
266
|
+
|
267
|
+
<li class="method"><a href="IVLE/IVLEModule.html#method-i-module_lecturers">#module_lecturers — IVLE::IVLEModule</a>
|
268
|
+
|
269
|
+
<li class="method"><a href="IVLE/RostersAndGroups.html#method-i-module_official_group_users">#module_official_group_users — IVLE::RostersAndGroups</a>
|
270
|
+
|
271
|
+
<li class="method"><a href="IVLE/IVLEModule.html#method-i-module_reading">#module_reading — IVLE::IVLEModule</a>
|
272
|
+
|
273
|
+
<li class="method"><a href="IVLE/IVLEModule.html#method-i-module_reading_formatted">#module_reading_formatted — IVLE::IVLEModule</a>
|
274
|
+
|
275
|
+
<li class="method"><a href="IVLE/IVLEModule.html#method-i-module_reading_unformatted">#module_reading_unformatted — IVLE::IVLEModule</a>
|
276
|
+
|
277
|
+
<li class="method"><a href="IVLE/IVLEModule.html#method-i-module_weblinks">#module_weblinks — IVLE::IVLEModule</a>
|
278
|
+
|
279
|
+
<li class="method"><a href="IVLE/IVLEModule.html#method-i-modules">#modules — IVLE::IVLEModule</a>
|
280
|
+
|
281
|
+
<li class="method"><a href="IVLE/IVLEModule.html#method-i-modules_search">#modules_search — IVLE::IVLEModule</a>
|
282
|
+
|
283
|
+
<li class="method"><a href="IVLE/IVLEModule.html#method-i-modules_staff">#modules_staff — IVLE::IVLEModule</a>
|
284
|
+
|
285
|
+
<li class="method"><a href="IVLE/IVLEModule.html#method-i-modules_student">#modules_student — IVLE::IVLEModule</a>
|
286
|
+
|
287
|
+
<li class="method"><a href="IVLE/IVLEModule.html#method-i-modules_taken">#modules_taken — 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 — 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 — 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 — IVLE::MyOrganizer</a>
|
294
|
+
|
295
|
+
<li class="method"><a href="IVLE/MyOrganizer.html#method-i-my_organizer_events">#my_organizer_events — IVLE::MyOrganizer</a>
|
296
|
+
|
297
|
+
<li class="method"><a href="IVLE/MyOrganizer.html#method-i-my_organizer_ivle">#my_organizer_ivle — IVLE::MyOrganizer</a>
|
298
|
+
|
299
|
+
<li class="method"><a href="IVLE/MyOrganizer.html#method-i-my_organizer_personal">#my_organizer_personal — IVLE::MyOrganizer</a>
|
300
|
+
|
301
|
+
<li class="method"><a href="IVLE/MyOrganizer.html#method-i-my_organizer_special_days">#my_organizer_special_days — 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 — IVLE::MyOrganizer</a>
|
304
|
+
|
305
|
+
<li class="method"><a href="IVLE/OpenWebcastLectures.html#method-i-open_webcast_add_log">#open_webcast_add_log — IVLE::OpenWebcastLectures</a>
|
306
|
+
|
307
|
+
<li class="method"><a href="IVLE/OpenWebcastLectures.html#method-i-open_webcasts">#open_webcasts — IVLE::OpenWebcastLectures</a>
|
308
|
+
|
309
|
+
<li class="method"><a href="IVLE/Poll.html#method-i-poll_get_voted_user">#poll_get_voted_user — 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 — IVLE::Poll</a>
|
312
|
+
|
313
|
+
<li class="method"><a href="IVLE/Poll.html#method-i-poll_submit_vote">#poll_submit_vote — IVLE::Poll</a>
|
314
|
+
|
315
|
+
<li class="method"><a href="IVLE/Poll.html#method-i-polls">#polls — IVLE::Poll</a>
|
316
|
+
|
317
|
+
<li class="method"><a href="IVLE/Profile.html#method-i-profile_view">#profile_view — IVLE::Profile</a>
|
318
|
+
|
319
|
+
<li class="method"><a href="IVLE/RostersAndGroups.html#method-i-project_enrolled_groups">#project_enrolled_groups — 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 — IVLE::RostersAndGroups</a>
|
322
|
+
|
323
|
+
<li class="method"><a href="IVLE/RostersAndGroups.html#method-i-project_group_sign_up">#project_group_sign_up — IVLE::RostersAndGroups</a>
|
324
|
+
|
325
|
+
<li class="method"><a href="IVLE/RostersAndGroups.html#method-i-project_group_users">#project_group_users — IVLE::RostersAndGroups</a>
|
326
|
+
|
327
|
+
<li class="method"><a href="IVLE/RostersAndGroups.html#method-i-project_self_enrol_groups">#project_self_enrol_groups — IVLE::RostersAndGroups</a>
|
328
|
+
|
329
|
+
<li class="method"><a href="IVLE/IVLENews.html#method-i-public_news">#public_news — IVLE::IVLENews</a>
|
330
|
+
|
331
|
+
<li class="method"><a href="Fixtures/IVLE.html#method-i-read_fixture">#read_fixture — 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 — IVLE::StudentEvents</a>
|
334
|
+
|
335
|
+
<li class="method"><a href="IVLE/StudentEvents.html#method-i-student_events">#student_events — IVLE::StudentEvents</a>
|
336
|
+
|
337
|
+
<li class="method"><a href="IVLE/StudentEvents.html#method-i-student_events_categories">#student_events_categories — IVLE::StudentEvents</a>
|
338
|
+
|
339
|
+
<li class="method"><a href="IVLE/StudentEvents.html#method-i-student_events_category">#student_events_category — IVLE::StudentEvents</a>
|
340
|
+
|
341
|
+
<li class="method"><a href="IVLE/StudentEvents.html#method-i-student_events_committee">#student_events_committee — IVLE::StudentEvents</a>
|
342
|
+
|
343
|
+
<li class="method"><a href="IVLE/StudentEvents.html#method-i-student_events_committees">#student_events_committees — IVLE::StudentEvents</a>
|
344
|
+
|
345
|
+
<li class="method"><a href="IVLE/Timetable.html#method-i-timetable_module">#timetable_module — IVLE::Timetable</a>
|
346
|
+
|
347
|
+
<li class="method"><a href="IVLE/Timetable.html#method-i-timetable_module_exam">#timetable_module_exam — IVLE::Timetable</a>
|
348
|
+
|
349
|
+
<li class="method"><a href="IVLE/MyOrganizer.html#method-i-timetable_student">#timetable_student — IVLE::MyOrganizer</a>
|
350
|
+
|
351
|
+
<li class="method"><a href="IVLE/Timetable.html#method-i-timetable_student">#timetable_student — IVLE::Timetable</a>
|
352
|
+
|
353
|
+
<li class="method"><a href="IVLE/Timetable.html#method-i-timetable_student_module">#timetable_student_module — IVLE::Timetable</a>
|
354
|
+
|
355
|
+
<li class="method"><a href="IVLE/Login.html#method-i-useremail_get">#useremail_get — IVLE::Login</a>
|
356
|
+
|
357
|
+
<li class="method"><a href="IVLE/Login.html#method-i-userid_get">#userid_get — IVLE::Login</a>
|
358
|
+
|
359
|
+
<li class="method"><a href="IVLE/Login.html#method-i-username_get">#username_get — IVLE::Login</a>
|
360
|
+
|
361
|
+
<li class="method"><a href="IVLE/Login.html#method-i-validate">#validate — IVLE::Login</a>
|
362
|
+
|
363
|
+
<li class="method"><a href="IVLE/Webcast.html#method-i-webcast_add_log">#webcast_add_log — IVLE::Webcast</a>
|
364
|
+
|
365
|
+
<li class="method"><a href="IVLE/Webcast.html#method-i-webcasts">#webcasts — IVLE::Webcast</a>
|
366
|
+
|
367
|
+
<li class="method"><a href="IVLE/Workbin.html#method-i-workbins">#workbins — IVLE::Workbin</a>
|
368
|
+
|
369
|
+
<li class="method"><a href="IVLE/Gradebook.html#method-i-workbins">#workbins — 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
|
+
|
data/lib/IVLE.rb
ADDED
@@ -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
|