public async Task <IEnumerable <Content> > GetContentForCourseAsync(string courseId) { var uri = $"learning/CourseData/content/tableofcontent/withcontent?courseId={courseId}&lms={Preferences.LMS}"; var exceptionMessage = $"There was error while attempting to get content for course with id: {courseId}"; return(await _apiContext.GetResourcesAsync <Content, ContentDto>(uri, exceptionMessage)); }
public async Task <IEnumerable <Assignment> > GetAssignmentsAsync(string courseId) { var uri = $"learning/CourseData/grade/course/{courseId}?lms={Preferences.LMS}"; var message = $"There was an error while attempting to get assignments for course with course id: {courseId}"; return(await _apiContext.GetResourcesAsync <Assignment, AssignmentDto>(uri, message)); }
public async Task <IEnumerable <Grade> > GetGradesAsync(string courseId) { var uri = $"learning/CourseData/grade/course/{courseId}?lms={Preferences.LMS}"; var message = $"There was an error while attempting to get the grades for the course with the id: {courseId}."; return(await _apiContext.GetResourcesAsync <Grade, GradeDto>(uri, message)); }
public async Task <Project> GetProjectAsync(string ProjectId) { var uri = $"learning/ProjectData/Project/Project/{ProjectId}"; var message = $"There was an error while attempting to get the Project with id: {ProjectId}"; return((await _apiContext.GetResourcesAsync <Project, ProjectDto>(uri, message)).FirstOrDefault()); }
public async Task <Course> GetCourseAsync(string courseId) { var uri = $"learning/CourseData/course/course/{courseId}?lms={Preferences.LMS}"; var message = $"There was an error while attempting to get the course with id: {courseId}"; return((await _apiContext.GetResourcesAsync <Course, CourseDto>(uri, message)).FirstOrDefault()); }
public async Task <IEnumerable <Announcement> > GetAllAnnouncementsAsync() { var uri = $"learning/CourseData/announcement?lms={Preferences.LMS}"; var message = $"There was an error while attempting to get all announcements"; return(await _apiContext.GetResourcesAsync <Announcement, AnnouncementDto>(uri, message)); }
public async Task <Term> GetTermByCode(string code) { var uri = $"learning/CourseData/term?code={code}"; var message = $"There was an error while attempting to get the term with code: {code}"; return((await _apiContext.GetResourcesAsync <Term, TermDto>(uri, message)).FirstOrDefault()); }
public async Task <IEnumerable <AccountHold> > GetAccountHoldsAsync() { var uri = $"learning/AccountData/user/accounthold"; var message = $"There was an error while attempting to get the account holds"; return(await _apiContext.GetResourcesAsync <AccountHold, AccountHoldDto>(uri, message)); }
public async Task <IEnumerable <Syllabus> > GetSyllabiForCourseAsync(string crn, string termCode, bool isCrosslistedCourse) { var uri = $"learning/CourseData/content/syllabi?termCode={termCode}&crn={crn}&crossListedCourse={isCrosslistedCourse}"; var exceptionMessage = $"There was error while attempting to get syllabi for course with crn: {crn} and term code: {termCode}."; return(await _apiContext.GetResourcesAsync <Syllabus, SyllabusDto>(uri, exceptionMessage)); }
public async Task <IEnumerable <Video> > GetVideosForCourseAsync(string crn, int thumbnailHeight, int thumbnailWidth) { var uri = $"learning/CourseVideoData/user/crn/{crn}?thumbnailHeight={thumbnailHeight}&thumbnailWidth={thumbnailWidth}"; var exceptionMessage = $"There was error while attempting to get videos for course with crn: {crn}"; return(await _apiContext.GetResourcesAsync <Video, VideoDto>(uri, exceptionMessage)); }