Project

oneroster

0.0
Low commit activity in last 3 years
Wrapper for the OneRoster API.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

 Project Readme

OneRoster

This is a simple Ruby API wrapper for OneRoster.

Installation

Add this line to your application's Gemfile:

gem 'one_roster'

And then execute:

$ bundle

Or install it yourself as:

$ gem install one_roster

Usage

Configuration

The gem can be initialized as follows:

client = OneRoster::Client.configure do |config|
  config.app_id     = 'app_id for district'
  config.app_secret = 'app_secret for district'
  config.api_url    = 'api_url for district'
end

Requests

This gem supports requesting:

  • Students
  • Teachers
  • Classes
  • Classrooms
  • Courses
  • Enrollments

Students

  • Request all students:
      client.students
  • Request a subset of students filtered by their sourcedId:
      client.students([student_1['sourcedId']], student_2['sourcedId'], ])

Teachers

  • Request all students:
    client.teachers
  • Request a subset of teachers filtered by their sourcedId:
    client.teachers([teacher_1['sourcedId']], teacher_2['sourcedId'], ])

Classes

  • Request all classes:
    client.classes
  • Request a subset of classes filtered by their sourcedId:
    client.classes([class_1['sourcedId']], class_2['sourcedId'], ])

Classrooms

  • Request all classrooms:
    client.classrooms
  • Request a subset of active classrooms whose UIDs are found in OneRoster's classes, filtered by their course's sourcedId:
    client.classes([enrollment_1['course']['sourcedId'], enrollment_2['course']['sourcedId'], ])

Courses

  • Request all courses:
    client.courses
  • Request a subset of active courses whose UIDs are found in OneRoster's classes, filtered by their sourcedId:
    client.classes([course_1['sourcedId'], course_2['sourcedId'], ])

Enrollments

  • Request all enrollments
      client.enrollments
  • Request a subset of active enrollments filtered by their class's sourcedID:
    client.enrollments([class_1['sourcedId'], class_2['sourcedId']])

Development

After checking out the repo, run bin/setup to install dependencies. Then, run bin/rspec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/tci/oneroster.

License

The gem is available as open source under the terms of the MIT License.