0.0
No commit activity in last 3 years
No release in over 3 years
Client for School Loop API (OpenLoop)
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.0

Runtime

 Project Readme

School Loop API

Build Status Gem Version

Installation

Install the gem by issuing

gem install school_loop

or put it in your Gemfile and run bundle install

gem "school_loop"

Configuration

These global settings will be used unless specifically overridden by an instance below.

SchoolLoop.configure do |config|
  config.subdomain  = 'demoschool'
  config.username   = 'apiuser'
  config.password   = 'some_api_password'
  config.adapter    = :net_http
end

Usage

Create a new client using the global defaults:

school_loop = SchoolLoop.new

Create a new client instance and override global defaults

school_loop = SchoolLoop.new subdomain: 'demoschool', username: 'apiuser', password: 'some_api_password'

Alternatively, you can configure the School Loop settings by passing a block:

school_loop = SchoolLoop.new do |config|
  config.subdomain  = 'demoschool'
  config.username   = 'apiuser'
  config.password   = 'some_api_password'
  config.adapter    = :net_http
end

Currently, only three methods are implemented:

Get Entire School Roster

roster = school_loop.get_roster
# returns a Nokogiri::XML::Document

Get Teacher Roster

teacher_id = "12345"
roster = school_loop.get_roster(teacher_id)
# returns a Nokogiri::XML::Document (with a single 'teacher' node)

Example roster data is available on School Loop's Documentation

Posting Progress Reports

For a detailed schema for Progress reports, you can look at School Loop's Progress Report API Schema

prog_report_xml = <<-EOF
<?xml version="1.0" encoding="UTF-8"?>
<root>
  <sections>
    <section ID="1234">
      <progressReports>
        <progressReport markName="Current Grades" ... grade="A">
          ...
        </progressReport>
      </progressReports>
    </section>
  </sections>
</root>
EOF

school_loop.publish_progress_report(prog_report_xml)

License

MIT

Special Thanks

This gem is heavily based on the bitbucket_rest_api gem by Mike Cochran.