Installation
gem install xod_client
Getting started
require 'xporter_on_demand'
relying_party = "app.example.com" school_estab = "1234567" estab_secret = "YOUR SECRET HERE"
token = XporterOnDemand::Token.new(school_estab, relying_party, estab_secret).retrieve
client = XporterOnDemand::Client.new(token.token)
students_endpoint = XporterOnDemand::Endpoint.create(:students, options: [:include_group_ids, :include_att_stats], parameters: { student_status: 'OnRoll' })
student_results = client.query(students_endpoint)
student_results.fetch_all
Using the Invitation API
reg = XporterOnDemand::Registration.new do |r|
r.registration_type = 'Test' r.partner_id = 'your-partner-id'
r.app_management_secret = 'your-app-management-secret'
end
school = {
lea_code: 123, dfes_code: 4567, school_name: 'Test School', school_contact_first_name: 'Joe', school_contact_last_name: 'Bloggs', school_contact_email: '[email protected]', school_contact_phone: '01234 567890', school_contact: 'Joe Bloggs',
school_technical_contact_name: 'Jim Bloggs',
school_technical_contact_email: '[email protected]',
school_technical_contact_phone: '01234 567890',
partner_application_id: 'your-partner-id', partner_name: 'your-registered-name', partner_registered_email: 'your-registered-email', we_accept_groupcall_usage_policy: true, }
reg.add_school(school)
reg.register
reg.message
reg.schools.first.message