/// <summary> /// Request all xLeas value changes from a given point. /// </summary> /// <param name="opaqueMarker">Uses an ISO8601 timestamp that indicates a point since the last changes have been requested.</param> /// <returns>List of xLeas type.</returns> internal ResponseMulti <XLeaType> GetXLeas(string opaqueMarker) { RestReturn rr = new RestReturn(); RestHeader rh = new RestHeader(); RestQueryParameter rqp = new RestQueryParameter(opaqueMarker); RestProperties rp = new RestProperties(baseApiUrl, ServicePath.GetXLeas, rh, rqp); return(rr.MakeAllRequest <XLeaType, XLeaCollectionType>(rc, rp)); }
/// <summary> /// Request all xLeas value changes from a given point by a specific xContact with paging. /// </summary> /// <param name="refId">RefId of xContact.</param> /// <param name="navigationPage">Page to retrieve.</param> /// <param name="navigationPageSize">Number of resources to retrieve.</param> /// <param name="opaqueMarker">Uses an ISO8601 timestamp that indicates a point since the last changes have been requested.</param> /// <returns>List of xLeas type.</returns> internal ResponseMulti <XLeaType> GetXLeasByXContact(string refId, int?navigationPage, int?navigationPageSize, string opaqueMarker) { RestReturn rr = new RestReturn(); RestHeader rh = new RestHeader(navigationPage, navigationPageSize); RestQueryParameter rqp = new RestQueryParameter(opaqueMarker); RestProperties rp = new RestProperties(baseApiUrl, ServicePath.GetXLeasByXContact, refId, rh, rqp); return(rr.MakeAllRequest <XLeaType, XLeaCollectionType>(rc, rp)); }
/// <summary> /// Request all xLeas with paging by school year. /// </summary> /// <param name="navigationPage">Page to retrieve.</param> /// <param name="navigationPageSize">Number of resources to retrieve.</param> /// <param name="schoolYear">The year of the requested data (i.e. 2018 for the 2017-2018 school year).</param> /// <returns>List of xLeas type.</returns> internal ResponseMulti <XLeaType> GetXLeas(int?navigationPage, int?navigationPageSize, int?schoolYear) { RestReturn rr = new RestReturn(); RestHeader rh = new RestHeader(navigationPage, navigationPageSize, schoolYear); RestQueryParameter rqp = new RestQueryParameter(); RestProperties rp = new RestProperties(baseApiUrl, ServicePath.GetXLeas, rh, rqp); return(rr.MakeAllRequest <XLeaType, XLeaCollectionType>(rc, rp)); }
/// <summary> /// Request single xLea by BEDS code or Local Id by school year. /// </summary> /// <param name="idType">Header value can be set to beds or local.</param> /// <param name="id">BEDS or Local Id.</param> /// <param name="schoolYear">The year of the requested data (i.e. 2018 for the 2017-2018 school year).</param> /// <returns>Single xLeas type.</returns> internal ResponseSingle <XLeaType> GetXLea(string idType, string id, int?schoolYear) { RestReturn rr = new RestReturn(); RestHeader rh = new RestHeader(idType, id, schoolYear); RestQueryParameter rqp = new RestQueryParameter(); RestProperties rp = new RestProperties(baseApiUrl, ServicePath.GetXLeaById, rh, rqp); return(rr.MakeSingleRequest <XLeaType, XLeaCollectionType>(rc, rp)); }
/// <summary> /// Request xLeas associated to a specific xContact by refId by school year. /// </summary> /// <param name="refId">RefId of xContact.</param> /// <param name="schoolYear">The year of the requested data (i.e. 2018 for the 2017-2018 school year).</param> /// <returns>List of xLeas type.</returns> internal ResponseMulti <XLeaType> GetXLeasByXContact(string refId, int?schoolYear) { RestReturn rr = new RestReturn(); RestHeader rh = new RestHeader(schoolYear); RestQueryParameter rqp = new RestQueryParameter(); RestProperties rp = new RestProperties(baseApiUrl, ServicePath.GetXLeasByXContact, refId, rh, rqp); return(rr.MakeAllRequest <XLeaType, XLeaCollectionType>(rc, rp)); }
internal void DeleteXStaffUsernamesPasswords(string refId) { RestReturn rr = new RestReturn(); RestHeader rh = new RestHeader(); RestQueryParameter rqp = new RestQueryParameter(AUPPEnum.DELETEUSERNAMESPASSWORDS); RestProperties rp = new RestProperties(baseApiUrl, ServicePath.GetXStaffsByXSchool, refId, rh, rqp); rr.MakeAllRequest <XStaffType, XStaffCollectionType>(rc, rp); }
/// <summary> /// Request xRosters associated to a specific xCourse by refId. /// </summary> /// <param name="refId">RefId of xCourse.</param> /// <returns>List of xRosters type.</returns> internal ResponseMulti <XRosterType> GetXRostersByXCourse(string refId) { RestReturn rr = new RestReturn(); RestHeader rh = new RestHeader(); RestQueryParameter rqp = new RestQueryParameter(); RestProperties rp = new RestProperties(baseApiUrl, ServicePath.GetXRostersByXCourse, refId, rh, rqp); return(rr.MakeAllRequest <XRosterType, XRosterCollectionType>(rc, rp)); }
/// <summary> /// Request single xSchool by refId by school year. /// </summary> /// <param name="refId">RefId of xSchool.</param> /// <param name="schoolYear">The year of the requested data (i.e. 2018 for the 2017-2018 school year).</param> /// <returns>Single xSchools type.</returns> internal ResponseSingle <XSchoolType> GetXSchool(string refId, int?schoolYear) { RestReturn rr = new RestReturn(); RestHeader rh = new RestHeader(schoolYear); RestQueryParameter rqp = new RestQueryParameter(); RestProperties rp = new RestProperties(baseApiUrl, ServicePath.GetXSchoolByRefId, refId, rh, rqp); return(rr.MakeSingleRequest <XSchoolType, XSchoolCollectionType>(rc, rp)); }
/// <summary> /// Request all xSchools by school year. /// </summary> /// <param name="schoolYear">The year of the requested data (i.e. 2018 for the 2017-2018 school year).</param> /// <returns>List of xSchools type.</returns> internal ResponseMulti <XSchoolType> GetXSchools(int?schoolYear) { RestReturn rr = new RestReturn(); RestHeader rh = new RestHeader(schoolYear); RestQueryParameter rqp = new RestQueryParameter(); RestProperties rp = new RestProperties(baseApiUrl, ServicePath.GetXSchools, rh, rqp); return(rr.MakeAllRequest <XSchoolType, XSchoolCollectionType>(rc, rp)); }
/// <summary> /// Request all xCalendars. /// </summary> /// <returns>List of xCalendars type.</returns> internal ResponseMulti <XCalendarType> GetXCalendars() { RestReturn rr = new RestReturn(); RestHeader rh = new RestHeader(); RestQueryParameter rqp = new RestQueryParameter(); RestProperties rp = new RestProperties(baseApiUrl, ServicePath.GetXCalendars, rh, rqp); return(rr.MakeAllRequest <XCalendarType, XCalendarCollectionType>(rc, rp)); }
/// <summary> /// Request single xStudent by State or Local Id. /// </summary> /// <param name="idType">Header value can be set to state or local.</param> /// <param name="id">State or Local Id.</param> /// <returns>Single xStudents type.</returns> internal ResponseSingle <XStudentType> GetXStudent(string idType, string id) { RestReturn rr = new RestReturn(); RestHeader rh = new RestHeader(idType, id); RestQueryParameter rqp = new RestQueryParameter(); RestProperties rp = new RestProperties(baseApiUrl, ServicePath.GetXStudentById, rh, rqp); return(rr.MakeSingleRequest <XStudentType, XStudentCollectionType>(rc, rp)); }
/// <summary> /// Request xCalendars associated to a specific xLea by refId with paging. /// </summary> /// <param name="refId">RefId of xLea.</param> /// <param name="navigationPage">Page to retrieve.</param> /// <param name="navigationPageSize">Number of resources to retrieve.</param> /// <returns>List of xCalendars type.</returns> internal ResponseMulti <XCalendarType> GetXCalendarsByXLea(string refId, int?navigationPage, int?navigationPageSize) { RestReturn rr = new RestReturn(); RestHeader rh = new RestHeader(navigationPage, navigationPageSize); RestQueryParameter rqp = new RestQueryParameter(); RestProperties rp = new RestProperties(baseApiUrl, ServicePath.GetXCalendarsByXLea, refId, rh, rqp); return(rr.MakeAllRequest <XCalendarType, XCalendarCollectionType>(rc, rp)); }
/// <summary> /// Request single xCalendar by refId. /// </summary> /// <param name="refId">RefId of xCalendar.</param> /// <returns>Single xCalendars type.</returns> internal ResponseSingle <XCalendarType> GetXCalendar(string refId) { RestReturn rr = new RestReturn(); RestHeader rh = new RestHeader(); RestQueryParameter rqp = new RestQueryParameter(); RestProperties rp = new RestProperties(baseApiUrl, ServicePath.GetXCalendarByRefId, refId, rh, rqp); return(rr.MakeSingleRequest <XCalendarType, XCalendarCollectionType>(rc, rp)); }
/// <summary> /// Request xContacts associated to a specific xStudent by refId. /// </summary> /// <param name="refId">RefId of xStudents.</param> /// <returns>List of xContacts type.</returns> internal ResponseMulti <XContactType> GetXContactsByXStudent(string refId) { RestReturn rr = new RestReturn(); RestHeader rh = new RestHeader(); RestQueryParameter rqp = new RestQueryParameter(); RestProperties rp = new RestProperties(baseApiUrl, ServicePath.GetXContactsByXStudent, refId, rh, rqp); return(rr.MakeAllRequest <XContactType, XContactCollectionType>(rc, rp)); }
/// <summary> /// Request generated xStudents usernames and passwords by xSchool. /// </summary> /// <param name="refId">RefId of xSchool.</param> /// <returns>List of xStudents type.</returns> internal ResponseMulti <XStudentType> GetXStudentUsers(string refId) { RestReturn rr = new RestReturn(); RestHeader rh = new RestHeader(); RestQueryParameter rqp = new RestQueryParameter(AUPPEnum.GET); RestProperties rp = new RestProperties(baseApiUrl, ServicePath.GetXStudentsByXSchool, refId, rh, rqp); return(rr.MakeAllRequest <XStudentType, XStudentCollectionType>(rc, rp)); }
/// <summary> /// Request xSchools associated to a specific xStudent by refId with paging by school year. /// </summary> /// <param name="refId">RefId of xStudent.</param> /// <param name="navigationPage">Page to retrieve.</param> /// <param name="navigationPageSize">Number of resources to retrieve.</param> /// <param name="schoolYear">The year of the requested data (i.e. 2018 for the 2017-2018 school year).</param> /// <returns>List of xSchools type.</returns> internal ResponseMulti <XSchoolType> GetXSchoolsByXStudent(string refId, int?navigationPage, int?navigationPageSize, int?schoolYear) { RestReturn rr = new RestReturn(); RestHeader rh = new RestHeader(navigationPage, navigationPageSize, schoolYear); RestQueryParameter rqp = new RestQueryParameter(); RestProperties rp = new RestProperties(baseApiUrl, ServicePath.GetXSchoolsByXStudent, refId, rh, rqp); return(rr.MakeAllRequest <XSchoolType, XSchoolCollectionType>(rc, rp)); }
internal void CreateXStaffUsers(string refId) { RestReturn rr = new RestReturn(); RestHeader rh = new RestHeader(); RestQueryParameter rqp = new RestQueryParameter(AUPPEnum.CREATE); RestProperties rp = new RestProperties(baseApiUrl, ServicePath.GetXStaffsByXSchool, refId, rh, rqp); rr.MakeAllRequest <XStaffType, XStaffCollectionType>(rc, rp); }
/// <summary> /// Request all xSchools value changes from a given point by a specific xContact. /// </summary> /// <param name="refId">RefId of xContact.</param> /// <param name="opaqueMarker">Uses an ISO8601 timestamp that indicates a point since the last changes have been requested.</param> /// <returns>List of xSchools type.</returns> internal ResponseMulti <XSchoolType> GetXSchoolsByXContact(string refId, string opaqueMarker) { RestReturn rr = new RestReturn(); RestHeader rh = new RestHeader(); RestQueryParameter rqp = new RestQueryParameter(opaqueMarker); RestProperties rp = new RestProperties(baseApiUrl, ServicePath.GetXSchoolsByXContact, refId, rh, rqp); return(rr.MakeAllRequest <XSchoolType, XSchoolCollectionType>(rc, rp)); }
/// <summary> /// Request generated xStaffs usernames and passwords by xSchool with paging. /// </summary> /// <param name="refId">RefId of xSchool.</param> /// <param name="navigationPage">Page to retrieve.</param> /// <param name="navigationPageSize">Number of resources to retrieve.</param> /// <returns>List of xStaffs type.</returns> internal ResponseMulti <XStaffType> GetXStaffUsers(string refId, int?navigationPage, int?navigationPageSize) { RestReturn rr = new RestReturn(); RestHeader rh = new RestHeader(navigationPage, navigationPageSize); RestQueryParameter rqp = new RestQueryParameter(AUPPEnum.GET); RestProperties rp = new RestProperties(baseApiUrl, ServicePath.GetXStaffsByXSchool, refId, rh, rqp); return(rr.MakeAllRequest <XStaffType, XStaffCollectionType>(rc, rp)); }
/// <summary> /// Returns the max page value for specified service path object. /// </summary> /// <param name="servicePath">The requested service path.</param> /// <param name="refId">RefId of xObject.</param> /// <param name="navigationPageSize">Number of resources to retrieve.</param> /// <param name="schoolYear">The year of the requested data (i.e. 2018 for the 2017-2018 school year).</param> /// <returns>Integer value.</returns> internal int GetLastPage(ServicePath servicePath, string refId, int?navigationPageSize, int?schoolYear) { int navigationPage = 1; RestReturn rr = new RestReturn(); RestHeader rh = new RestHeader(navigationPage, navigationPageSize, schoolYear); RestQueryParameter rqp = new RestQueryParameter(); try { switch (servicePath.GetServicePathName()) { case "GetXLeasByXSchool": case "GetXLeasByXRoster": case "GetXLeasByXStaff": case "GetXLeasByXStudent": case "GetXLeasByXContact": { RestProperties rp = new RestProperties(baseApiUrl, servicePath, refId, rh, rqp); rr.MakeAllRequest <XLeaType, XLeaCollectionType>(rc, rp); break; } case "GetXSchoolsByXLea": case "GetXSchoolsByXCalendar": case "GetXSchoolsByXCourse": case "GetXSchoolsByXRoster": case "GetXSchoolsByXStaff": case "GetXSchoolsByXStudent": case "GetXSchoolsByXContact": { RestProperties rp = new RestProperties(baseApiUrl, servicePath, refId, rh, rqp); rr.MakeAllRequest <XSchoolType, XSchoolCollectionType>(rc, rp); break; } case "GetXCalendarsByXLea": case "GetXCalendarsByXSchool": { RestProperties rp = new RestProperties(baseApiUrl, servicePath, refId, rh, rqp); rr.MakeAllRequest <XCalendarType, XCalendarCollectionType>(rc, rp); break; } case "GetXCoursesByXLea": case "GetXCoursesByXSchool": case "GetXCoursesByXRoster": { RestProperties rp = new RestProperties(baseApiUrl, servicePath, refId, rh, rqp); rr.MakeAllRequest <XCourseType, XCourseCollectionType>(rc, rp); break; } case "GetXRostersByXLea": case "GetXRostersByXSchool": case "GetXRostersByXCourse": case "GetXRostersByXStaff": case "GetXRostersByXStudent": { RestProperties rp = new RestProperties(baseApiUrl, servicePath, refId, rh, rqp); rr.MakeAllRequest <XRosterType, XRosterCollectionType>(rc, rp); break; } case "GetXStaffsByXLea": case "GetXStaffsByXSchool": case "GetXStaffsByXCourse": case "GetXStaffsByXRoster": case "GetXStaffsByXStudent": { RestProperties rp = new RestProperties(baseApiUrl, servicePath, refId, rh, rqp); rr.MakeAllRequest <XStaffType, XStaffCollectionType>(rc, rp); break; } case "GetXStudentsByXLea": case "GetXStudentsByXSchool": case "GetXStudentsByXRoster": case "GetXStudentsByXStaff": case "GetXStudentsByXContact": { RestProperties rp = new RestProperties(baseApiUrl, servicePath, refId, rh, rqp); rr.MakeAllRequest <XStudentType, XStudentCollectionType>(rc, rp); break; } case "GetXContactsByXLea": case "GetXContactsByXSchool": case "GetXContactsByXStudent": { RestProperties rp = new RestProperties(baseApiUrl, servicePath, refId, rh, rqp); rr.MakeAllRequest <XContactType, XContactCollectionType>(rc, rp); break; } } return(rr.NavigationLastPage); } catch (Exception) { return(0); } }