Module: Plurall

Defined in:
lib/plurall.rb,
lib/plurall/api.rb,
lib/plurall/errors.rb,
lib/plurall/classes.rb,
lib/plurall/schools.rb,
lib/plurall/version.rb,
lib/plurall/api/http.rb,
lib/plurall/managers.rb,
lib/plurall/students.rb,
lib/plurall/teachers.rb,
lib/plurall/directors.rb,
lib/plurall/api/client.rb,
lib/plurall/api/schema.rb,
lib/plurall/attendants.rb,
lib/plurall/coordinators.rb,
lib/plurall/configuration.rb,
lib/plurall/administrators.rb,
lib/plurall/student_classes.rb,
lib/plurall/api/person_query.rb,
lib/plurall/api/classes_query.rb,
lib/plurall/api/schools_query.rb,
lib/plurall/api/managers_query.rb,
lib/plurall/api/students_query.rb,
lib/plurall/api/teachers_query.rb,
lib/plurall/api/directors_query.rb,
lib/plurall/api/attendants_query.rb,
lib/plurall/api/coordinators_query.rb,
lib/plurall/api/administrators_query.rb,
lib/plurall/api/student_classes_query.rb

Overview

A full implementation the Plurall API in Ruby.

Examples

Plurall.schools.each do |school|
  puts school.legal_name
end

Defined Under Namespace

Modules: Api Classes: Administrators, Attendants, Classes, Configuration, Coordinators, Directors, Error, Managers, Schools, StudentClasses, Students, Teachers, TokenExpiredError

Constant Summary collapse

VERSION =

Public: The version number as a String.

"0.1.0"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configurationObject



38
39
40
# File 'lib/plurall/configuration.rb', line 38

def self.configuration
  @configuration ||= Plurall::Configuration.new
end

Class Method Details

.administrators(school_id:, first: 30, after: "", before: "", page: 0, search: "") ⇒ Object

Public: Retrieve a list of administrators for a school.

school_id - The school ID to retrieve administrators for as a String or Integer. first - The number of administrators to retrieve as an Integer. after - The next cursor to retrieve administrators for as a String. before - The end cursor to retrieve administrators for as a String. page - The numbered page to retrieve administrators for as an Integer. search - The search value to retrieve administrators for as a String.

Examples

Plurall.administrators(school_id: 123456).each do |administrator|
  puts administrator.name
end

Returns Plurall::Administrators.



160
161
162
163
# File 'lib/plurall.rb', line 160

def self.administrators school_id:, first: 30, after: "", before: "", page: 0, search: ""
  Plurall::Administrators.new Plurall::Api.administrators school_id: school_id, first: first, after: after,
    before: before, page: page, search: search
end

.attendants(school_id:, first: 30, after: "", before: "", page: 0, search: "") ⇒ Object

Public: Retrieve a list of attendants for a school.

school_id - The school ID to retrieve attendants for as a String or Integer. first - The number of attendants to retrieve as an Integer. after - The next cursor to retrieve attendants for as a String. before - The end cursor to retrieve attendants for as a String. page - The numbered page to retrieve attendants for as an Integer. search - The search value to retrieve attendants for as a String.

Examples

Plurall.attendants(school_id: 123456).each do |attendant|
  puts attendant.name
end

Returns Plurall::Attendants.



183
184
185
186
# File 'lib/plurall.rb', line 183

def self.attendants school_id:, first: 30, after: "", before: "", page: 0, search: ""
  Plurall::Attendants.new Plurall::Api.attendants school_id: school_id, first: first, after: after, before: before,
    page: page, search: search
end

.classes(school_id:, first: 30, after: "", before: "", page: 0, search: "") ⇒ Object

Public: Retrieve a list of classes for a school.

school_id - The school ID to retrieve classes for as a String or Integer. first - The number of classes to retrieve as an Integer. after - The next cursor to retrieve classes for as a String. before - The end cursor to retrieve classes for as a String. page - The numbered page to retrieve classes for as an Integer. search - The search value to retrieve classes for as a String.

Examples

Plurall.classes(school_id: 123456).each do |student_class|
  puts student_class.name
end

Returns Plurall::Classes.



137
138
139
140
# File 'lib/plurall.rb', line 137

def self.classes school_id:, first: 30, after: "", before: "", page: 0, search: ""
  Plurall::Classes.new Plurall::Api.classes school_id: school_id, first: first, after: after, before: before,
    page: page, search: search
end

.configure {|configuration| ... } ⇒ Object

Yields:



34
35
36
# File 'lib/plurall/configuration.rb', line 34

def self.configure
  yield configuration
end

.coordinators(school_id:, first: 30, after: "", before: "", page: 0, search: "") ⇒ Object

Public: Retrieve a list of coordinators for a school.

school_id - The school ID to retrieve coordinators for as a String or Integer. first - The number of coordinators to retrieve as an Integer. after - The next cursor to retrieve coordinators for as a String. before - The end cursor to retrieve coordinators for as a String. page - The numbered page to retrieve coordinators for as an Integer. search - The search value to retrieve coordinators for as a String.

Examples

Plurall.coordinators(school_id: 123456).each do |coordinator|
  puts coordinator.name
end

Returns Plurall::Coordinators.



206
207
208
209
# File 'lib/plurall.rb', line 206

def self.coordinators school_id:, first: 30, after: "", before: "", page: 0, search: ""
  Plurall::Coordinators.new Plurall::Api.coordinators school_id: school_id, first: first, after: after,
    before: before, page: page, search: search
end

.directors(school_id:, first: 30, after: "", before: "", page: 0, search: "") ⇒ Object

Public: Retrieve a list of directors for a school.

school_id - The school ID to retrieve directors for as a String or Integer. first - The number of directors to retrieve as an Integer. after - The next cursor to retrieve directors for as a String. before - The end cursor to retrieve directors for as a String. page - The numbered page to retrieve directors for as an Integer. search - The search value to retrieve directors for as a String.

Examples

Plurall.directors(school_id: 123456).each do |director|
  puts director.name
end

Returns Plurall::Directors.



229
230
231
232
# File 'lib/plurall.rb', line 229

def self.directors school_id:, first: 30, after: "", before: "", page: 0, search: ""
  Plurall::Directors.new Plurall::Api.directors school_id: school_id, first: first, after: after, before: before,
    page: page, search: search
end

.managers(school_id:, first: 30, after: "", before: "", page: 0) ⇒ Object

Public: Retrieve a list of managers for a school.

school_id - The school ID to retrieve managers for as a String or Integer. first - The number of managers to retrieve as an Integer. after - The next cursor to retrieve managers for as a String. before - The end cursor to retrieve managers for as a String. page - The numbered page to retrieve managers for as an Integer. search - The search value to retrieve managers for as a String.

Examples

Plurall.managers(school_id: 123456).each do |manager|
  puts manager.name
end

Returns Plurall::Managers.



252
253
254
255
# File 'lib/plurall.rb', line 252

def self.managers school_id:, first: 30, after: "", before: "", page: 0
  Plurall::Managers.new Plurall::Api.managers school_id: school_id, first: first, after: after, before: before,
    page: page
end

.person(uuid:) ⇒ Object

Public: Retrieve a person record.

uuid - The person UUID to retrieve as a String.

Examples

person = Plurall.person uuid: "00000000-0000-0000-0000-000000000000"
puts person.name

Returns a GraphQL data object.



269
270
271
272
# File 'lib/plurall.rb', line 269

def self.person uuid:
  response = Plurall::Api.person uuid: uuid
  response.data.person
end

.schools(first: 30, after: "", before: "", page: 0, search: "") ⇒ Object

Public: Retrieve a list of schools.

first - The number of schools to retrieve as an Integer. after - The next cursor to retrieve schools for as a String. before - The end cursor to retrieve schools for as a String. page - The numbered page to retrieve schools for as an Integer. search - The search value to retrieve schools for as a String.

Examples

Plurall.schools.each do |school|
  puts school.legal_name
end

Returns Plurall::Schools.



45
46
47
# File 'lib/plurall.rb', line 45

def self.schools first: 30, after: "", before: "", page: 0, search: ""
  Plurall::Schools.new Plurall::Api.schools first: first, after: after, before: before, page: page, search: search
end

.student_classes(school_id:, uuid:, first: 30, after: "", before: "", page: 0, search: "") ⇒ Object

Public: Retrieve a list of classes for a student.

school_id - The school ID to retrieve classes for as a String or Integer. uuid - The student UUID to retrieve classes for as a String. first - The number of classes to retrieve as an Integer. after - The next cursor to retrieve classes for as a String. before - The end cursor to retrieve classes for as a String. page - The numbered page to retrieve classes for as an Integer. search - The search value to retrieve classes for as a String.

Examples

Plurall.student_classes(school_id: 123456, uuid: "00000000-0000-0000-0000-000000000000").each do |school_class|
  puts school_class.name
end

Returns Plurall::StudentClasses.



114
115
116
117
# File 'lib/plurall.rb', line 114

def self.student_classes school_id:, uuid:, first: 30, after: "", before: "", page: 0, search: ""
  Plurall::StudentClasses.new Plurall::Api.student_classes school_id: school_id, uuid: uuid, first: first,
    after: after, before: before, page: page, search: search
end

.students(school_id:, first: 30, after: "", before: "", page: 0, search: "") ⇒ Object

Public: Retrieve a list of students for a school.

school_id - The school ID to retrieve students for as a String or Integer. first - The number of students to retrieve as an Integer. after - The next cursor to retrieve students for as a String. before - The end cursor to retrieve students for as a String. page - The numbered page to retrieve students for as an Integer. search - The search value to retrieve students for as a String.

Examples

Plurall.students(school_id: 123456).each do |student|
  puts student.name
end

Returns Plurall::Students.



90
91
92
93
# File 'lib/plurall.rb', line 90

def self.students school_id:, first: 30, after: "", before: "", page: 0, search: ""
  Plurall::Students.new Plurall::Api.students school_id: school_id, first: first, after: after, before: before,
    page: page, search: search
end

.teachers(school_id:, first: 30, after: "", before: "", page: 0, search: "") ⇒ Object

Public: Retrieve a list of teachers for a school.

school_id - The school ID to retrieve teachers for as a String or Integer. first - The number of teachers to retrieve as an Integer. after - The next cursor to retrieve teachers for as a String. before - The end cursor to retrieve teachers for as a String. page - The numbered page to retrieve teachers for as an Integer. search - The search value to retrieve teachers for as a String.

Examples

Plurall.teachers(school_id: 123456).each do |teacher|
  puts teacher.name
end

Returns Plurall::Teachers.



67
68
69
70
# File 'lib/plurall.rb', line 67

def self.teachers school_id:, first: 30, after: "", before: "", page: 0, search: ""
  Plurall::Teachers.new Plurall::Api.teachers school_id: school_id, first: first, after: after, before: before,
    page: page, search: search
end