Our open source Ruby client provides a simple way to invoke the API from Ruby.
To download the Ruby client, right-click /clients/lms_api.rb and the save the contents to your local computer.
The following example lists all the courses in your site:
begin api = LMS::Api.new(:host => 'yourschool.edu20.com', :api_key => '3616-1-d1e9...8f88', :version => 1, :use_ssl => true) puts "get_all_classes:" puts classes = api.get_all_classes for klass in classes puts "#{klass['id']}: #{klass['name']}, #{klass['style']}" end rescue Exception => exception puts "Exception: #{exception.message}" end
get_all_classes:
12461 => Introduction to Marketing, Self paced
12883 => Sales pitches, Self paced
13232 => Advanced Marketing, Instructor
14365 => Defensive Driving, Instructor