/// <summary> /// Constructor /// </summary> /// <param name="token">Api Token</param> /// <param name="url">School id if any</param> public Schools(string token, string id = "") : base(token, "schools/") { _token = token; if (id.Trim().Length > 0) { Uri = Uri + id + "/"; this.id = id; achievements = new Achievements(token, Uri); assessment = new Assessment(token, Uri); attendance = new Attendance(token, Uri); attendanceSumaries = new AttendanceSumaries(token, Uri); behaviours = new Behaviours(token, Uri); classes = new Classes(token, Uri); contacts = new Contacts(token, Uri); counts = new Counts(token, Uri); deletions = new Deletions(token, Uri); employees = new Employees(token, Uri); events = new Events(token, Uri); groups = new Groups(token, Uri); lessons = new Lessons(token, Uri); lessonAttendance = new LessonAttendance(token, Uri); medicalConditions = new MedicalConditions(token, Uri); medicalEvents = new MedicalEvents(token, Uri); periods = new Periods(token, Uri); photos = new Photos(token, Uri); rooms = new Rooms(token, Uri); students = new Students(token, Uri); subjects = new Subjects(token, Uri); preadmissions = new PreAdmissions(token, Uri); } }
/// <summary> /// Constructor /// </summary> /// <param name="token">Api Token</param> /// <param name="url">School id if any</param> public Schools(string token, string id = "") : base(token, "schools/") { // this method gets called twice. if (id != "") { var school = (Dictionary <string, object>)get(id); var region = (Dictionary <string, object>)school["region"]; var domain = region["domain"].ToString(); // sets BootstrapEndpoint URL Endpoint = domain; } _token = token; if (id.Trim().Length > 0) { Uri = Uri + id + "/"; this.id = id; achievements = new Achievements(token, Uri); assessment = new Assessment(token, Uri); attendance = new Attendance(token, Uri); attendanceSumaries = new AttendanceSumaries(token, Uri); behaviours = new Behaviours(token, Uri); classes = new Classes(token, Uri); contacts = new Contacts(token, Uri); counts = new Counts(token, Uri); deletions = new Deletions(token, Uri); doctors = new Doctors(token, Uri); employeeAbsences = new EmployeeAbsences(token, Uri); employees = new Employees(token, Uri); events = new Events(token, Uri); exclusions = new Exclusions(token, Uri); groups = new Groups(token, Uri); lessons = new Lessons(token, Uri); lessonAttendance = new LessonAttendance(token, Uri); medicalConditions = new MedicalConditions(token, Uri); medicalEvents = new MedicalEvents(token, Uri); periods = new Periods(token, Uri); photos = new Photos(token, Uri); preAdmissionStudents = new PreAdmissionStudents(token, Uri); rooms = new Rooms(token, Uri); students = new Students(token, Uri); subjects = new Subjects(token, Uri); } }