Basic Ruby gem wrapper for NUS IVLE LAPI interface. All methods are implemented (but not tested).
- IVLE LAPI documentation
- A skeleton gem documentation is available in
doc
, or here.
This gem is in beta and is not guaranteed to work 100%. If you encounter problems, submit an issue (preferably with the bugfix) and I'll get on it.
Add this line to your application's Gemfile:
gem 'ivle'
And then execute:
$ bundle
Or install it yourself as:
$ gem install ivle
ivle = IVLE::API.new('api_key', 'access_token')
=> #<IVLE::API:0x41e5a98 @api_key="api_key", @access_token="access_token">
# Or, pass in the username and password and retrieve the token via Mechanize
ivle = IVLE::API.new('api_key', 'username', 'password')
=> #<IVLE::API:0x4112d00 @api_key="api_key", @username="username", @password="password">
ivle.modules
=> {:Results=>[{:Announcements=>[], :Forums=>[], :Workbins=>[], :Webcasts=>[], ... }
ivle.profile_view
=> {:Results=>[{:UserID=>"My user ID", :Name=>"My Name", ...}
ivle.module_weblinks '4215f7f9-794d-4045-8d2d-0f8d2db2444f'
=> {"Results":[{"ID":"4215f7f9-794d-4045-8d2d-0f8d2db2444f","URL":"http://byob.berkeley.edu/", ... }
Log in to IVLE, then access this URL: http://ivle.nus.edu.sg/LAPI/default.aspx
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
- Use proper oAuth authentication
- More specs
There is a simple RSpec in spec
.
To run it: bundle exec rspec spec/api/api_spec.rb