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
-
Constructor Summary
ConstructorDescriptionUCSBCurriculumService
(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) getFinalsJSON
(String quarter, String enrollCode) 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
-
UCSBCurriculumService
public UCSBCurriculumService(org.springframework.boot.web.client.RestTemplateBuilder restTemplateBuilder)
-
-
Method Details
-
getJSON
-
getConvertedSections
public List<ConvertedSection> getConvertedSections(String subjectArea, String quarter, String courseLevel) throws com.fasterxml.jackson.core.JsonProcessingException - Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
getSectionJSON
public String getSectionJSON(String subjectArea, String quarter, String courseLevel) throws com.fasterxml.jackson.core.JsonProcessingException - Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
getSubjectsJSON
-
getSection
This method retrieves exactly one section matching the enrollCode and quarter arguments, if such a section exists. -
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. -
getJSONbyQtrEnrollCd
-
getFinalsJSON
-