Class: Wonde::Schools

Inherits:
Endpoints show all
Defined in:
lib/endpoints/schools.rb

Constant Summary collapse

@@uri =
'schools/'

Instance Attribute Summary collapse

Attributes inherited from Endpoints

#endpoint, #token, #version

Instance Method Summary collapse

Methods inherited from Endpoints

#all, #delete, #deleteRequest, #deleteUrl, #getRequest, #getUrl, #post, #postRequest, #postUrl

Constructor Details

#initialize(token, id = false) ⇒ Schools

Returns a new instance of Schools.



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/endpoints/schools.rb', line 9

def initialize(token, id=false)
  super(token, id)
  self.token = token
  self.uri = @@uri
  self.uri = @@uri + id + '/' if id
  self.uri = self.uri.gsub("//", "/").chomp("/")
  self.achievements      = Wonde::Achievements.new(token, self.uri)
  self.assessment        = Wonde::Assessment.new(token, self.uri)
  self.attendance        = Wonde::Attendance.new(token, self.uri)
  self.behaviours        = Wonde::Behaviours.new(token, self.uri)
  self.classes           = Wonde::Classes.new(token, self.uri)
  self.contacts          = Wonde::Contacts.new(token, self.uri)
  self.counts            = Wonde::Counts.new(token, self.uri)
  self.deletions         = Wonde::Deletions.new(token, self.uri)
  self.employees         = Wonde::Employees.new(token, self.uri)
  self.events            = Wonde::Events.new(token, self.uri)
  self.groups            = Wonde::Groups.new(token, self.uri)
  self.lessons           = Wonde::Lessons.new(token, self.uri)
  self.lessonAttendance  = Wonde::LessonAttendance.new(token, self.uri)
  self.medicalConditions = Wonde::MedicalConditions.new(token, self.uri)
  self.medicalEvents     = Wonde::MedicalEvents.new(token, self.uri)
  self.medicalNotes      = Wonde::MedicalNotes.new(token, self.uri)
  self.periods           = Wonde::Periods.new(token, self.uri)
  self.photos            = Wonde::Photos.new(token, self.uri)
  self.rooms             = Wonde::Rooms.new(token, self.uri)
  self.students          = Wonde::Students.new(token, self.uri)
  self.subjects          = Wonde::Subjects.new(token, self.uri)
end

Instance Attribute Details

#achievementsObject

Returns the value of attribute achievements.



3
4
5
# File 'lib/endpoints/schools.rb', line 3

def achievements
  @achievements
end

#assessmentObject

Returns the value of attribute assessment.



3
4
5
# File 'lib/endpoints/schools.rb', line 3

def assessment
  @assessment
end

#attendanceObject

Returns the value of attribute attendance.



3
4
5
# File 'lib/endpoints/schools.rb', line 3

def attendance
  @attendance
end

#behavioursObject

Returns the value of attribute behaviours.



3
4
5
# File 'lib/endpoints/schools.rb', line 3

def behaviours
  @behaviours
end

#classesObject

Returns the value of attribute classes.



3
4
5
# File 'lib/endpoints/schools.rb', line 3

def classes
  @classes
end

#contactsObject

Returns the value of attribute contacts.



3
4
5
# File 'lib/endpoints/schools.rb', line 3

def contacts
  @contacts
end

#countsObject

Returns the value of attribute counts.



3
4
5
# File 'lib/endpoints/schools.rb', line 3

def counts
  @counts
end

#deletionsObject

Returns the value of attribute deletions.



3
4
5
# File 'lib/endpoints/schools.rb', line 3

def deletions
  @deletions
end

#employeesObject

Returns the value of attribute employees.



3
4
5
# File 'lib/endpoints/schools.rb', line 3

def employees
  @employees
end

#eventsObject

Returns the value of attribute events.



3
4
5
# File 'lib/endpoints/schools.rb', line 3

def events
  @events
end

#groupsObject

Returns the value of attribute groups.



3
4
5
# File 'lib/endpoints/schools.rb', line 3

def groups
  @groups
end

#lessonAttendanceObject

Returns the value of attribute lessonAttendance.



3
4
5
# File 'lib/endpoints/schools.rb', line 3

def lessonAttendance
  @lessonAttendance
end

#lessonsObject

Returns the value of attribute lessons.



3
4
5
# File 'lib/endpoints/schools.rb', line 3

def lessons
  @lessons
end

#medicalConditionsObject

Returns the value of attribute medicalConditions.



3
4
5
# File 'lib/endpoints/schools.rb', line 3

def medicalConditions
  @medicalConditions
end

#medicalEventsObject

Returns the value of attribute medicalEvents.



3
4
5
# File 'lib/endpoints/schools.rb', line 3

def medicalEvents
  @medicalEvents
end

#medicalNotesObject

Returns the value of attribute medicalNotes.



3
4
5
# File 'lib/endpoints/schools.rb', line 3

def medicalNotes
  @medicalNotes
end

#periodsObject

Returns the value of attribute periods.



3
4
5
# File 'lib/endpoints/schools.rb', line 3

def periods
  @periods
end

#photosObject

Returns the value of attribute photos.



3
4
5
# File 'lib/endpoints/schools.rb', line 3

def photos
  @photos
end

#roomsObject

Returns the value of attribute rooms.



3
4
5
# File 'lib/endpoints/schools.rb', line 3

def rooms
  @rooms
end

#studentsObject

Returns the value of attribute students.



3
4
5
# File 'lib/endpoints/schools.rb', line 3

def students
  @students
end

#subjectsObject

Returns the value of attribute subjects.



3
4
5
# File 'lib/endpoints/schools.rb', line 3

def subjects
  @subjects
end

#uriObject

Returns the value of attribute uri.



3
4
5
# File 'lib/endpoints/schools.rb', line 3

def uri
  @uri
end

Instance Method Details

#get(id, includes = Array.new(), parameters = Array.new()) ⇒ Object



48
49
50
51
52
# File 'lib/endpoints/schools.rb', line 48

def get(id, includes = Array.new(), parameters = Array.new())
    self.uri = @@uri
    school = super(id, includes, parameters)
    return school
end

#pending(includes = Array.new(), parameters = Array.new()) ⇒ Object



38
39
40
41
# File 'lib/endpoints/schools.rb', line 38

def pending(includes = Array.new(), parameters = Array.new())
  self.uri = @@uri + 'pending/'
  return self.all(includes, parameters)
end

#search(includes = Hash.new(), parameters = Hash.new()) ⇒ Object



43
44
45
46
# File 'lib/endpoints/schools.rb', line 43

def search(includes = Hash.new(), parameters = Hash.new())
    self.uri = @@uri + 'all/'
    return self.all(includes, parameters)
end