Package edu.ucsb.cs156.courses.services
Class UCSBCurriculumService
java.lang.Object
edu.ucsb.cs156.courses.services.UCSBCurriculumService
Service object that wraps the UCSB Academic Curriculum API
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionUCSBCurriculumService
(org.springframework.boot.web.client.RestTemplateBuilder restTemplateBuilder) -
Method Summary
Modifier and TypeMethodDescriptiongetAllSections
(String enrollCode, String quarter) This method retrieves all of the sections related to a certain enroll code.getConvertedSections
(String subjectArea, String quarter, String courseLevel) getFinalsInfo
(String quarter, String enrollCd) This method retrieves the final exam information related to a certain enroll code.getJSONbyQtrEnrollCd
(String quarter, String enrollCd) getSection
(String enrollCode, String quarter) This method retrieves exactly one section matching the enrollCode and quarter arguments, if such a section exists.getSectionJSON
(String subjectArea, String quarter, String courseLevel)
-
Field Details
-
CURRICULUM_ENDPOINT
- See Also:
-
SUBJECTS_ENDPOINT
- See Also:
-
SECTION_ENDPOINT
- See Also:
-
ALL_SECTIONS_ENDPOINT
- See Also:
-
FINALS_ENDPOINT
- See Also:
-
-
Constructor Details
-
Method Details
-
getJSON
- Throws:
Exception
-
getConvertedSections
public List<ConvertedSection> getConvertedSections(String subjectArea, String quarter, String courseLevel) throws Exception - Throws:
Exception
-
getSectionJSON
public String getSectionJSON(String subjectArea, String quarter, String courseLevel) throws Exception - Throws:
Exception
-
getSubjectsJSON
- Throws:
Exception
-
getSection
This method retrieves exactly one section matching the enrollCode and quarter arguments, if such a section exists.- Throws:
Exception
-
getAllSections
This method retrieves all of the sections related to a certain enroll code. For example, if the enrollCode is for a discussion section, the lecture section and all related discussion sections will also be returned.- Throws:
Exception
-
getJSONbyQtrEnrollCd
- Throws:
Exception
-
getFinalsInfo
This method retrieves the final exam information related to a certain enroll code.- Throws:
Exception
-