LSE Courses
A gem for accessing course data from the London School of Economics's Calendar.
I'm planning to use this for a project, but I'm not 100% sure what yet - perhaps something along the line of YalePlus's Bluebook+.
Usage
Add the gem to your Gemfile, then run bundle install
:
gem 'lse_courses', git: '[email protected]:timrogers/lse_courses.git'
You might need to add a call to require 'lse_courses'
in your code,
dependent on your setup.
You can retrieve an array with every course offered at LSE:
courses = LSECourses::Course.all
courses.each do |course|
puts "#{course.code} - #{course.name}"
# LSE records include surveys on courses - stored in #survey on the object
puts "#{course.survey.recommended_by}% of students recommend this cause"
end
...or you can fetch a specific course by code:
course = LSECourses::Course.find_by_code("LSE100")
puts course.name
Upcoming features that should be added are some kind of search (e.g. for finding a course by name) and a way to find courses by type (e.g. undergraduate, graduate)...
Contributing
- 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 a new pull request