Help us shape the future of Go! Take the 2026 Go Developer Survey

controllers

package
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2026 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PROJECT_ID = "nebula-api-368223"
)

Variables

View Source
var DAGCollection *mongo.Collection = configs.GetCollection("DAG")

Functions

func AcademicCalendarsById

func AcademicCalendarsById(c *gin.Context)

AcademicCalendarsById returns an academic calendar by its string ID.

@Id				academicCalendarsById
@Router			/academicCalendars/{id} [get]
@Tags			Academic Calendars
@Description	Returns the academic calendar for the given term ID.
@Produce		json
@Param			id	path		string										true	"Academic term ID, for example 26F"
@Success		200	{object}	schema.APIResponse[schema.AcademicCalendar]	"An academic calendar"
@Failure		404	{object}	schema.APIResponse[string]					"No matching academic calendar"
@Failure		500	{object}	schema.APIResponse[string]					"An internal server error"

func AcademicCalendarsCurrent

func AcademicCalendarsCurrent(c *gin.Context)

AcademicCalendarsCurrent returns an academic calendar marked as current.

@Id				academicCalendarsCurrent
@Router			/academicCalendars/current [get]
@Tags			Academic Calendars
@Description	Returns one academic calendar whose timeline is current.
@Produce		json
@Success		200	{object}	schema.APIResponse[schema.AcademicCalendar]	"The current academic calendar"
@Failure		404	{object}	schema.APIResponse[string]					"No current academic calendar"
@Failure		500	{object}	schema.APIResponse[string]					"An internal server error"

func AstraEvents

func AstraEvents(c *gin.Context)

@Id AstraEvents @Router /astra/{date} [get] @Tags Events @Description "Returns AstraEvent based on the input date" @Produce json @Param date path string true "date (ISO format) to retrieve astra events" @Success 200 {object} schema.APIResponse[schema.MultiBuildingEvents[schema.AstraEvent]] "All AstraEvents with events on the inputted date" @Failure 500 {object} schema.APIResponse[string] "A string describing the error"

func AstraEventsByBuilding

func AstraEventsByBuilding(c *gin.Context)

@Id AstraEventsByBuilding @Router /astra/{date}/{building} [get] @Tags Events @Description "Returns AstraEvent based on the input date and building name" @Produce json @Param date path string true "date (ISO format) to retrieve astra events" @Param building path string true "building abbreviation of event locations" @Success 200 {object} schema.APIResponse[schema.SingleBuildingEvents[schema.AstraEvent]] "All sections with meetings on the specified date in the specified building" @Failure 500 {object} schema.APIResponse[string] "A string describing the error" @Failure 404 {object} schema.APIResponse[string] "A string describing the error"

func AstraEventsByBuildingAndRoom

func AstraEventsByBuildingAndRoom(c *gin.Context)

@Id AstraEventsByBuildingandRoom @Router /astra/{date}/{building}/{room} [get] @Tags Events @Description "Returns AstraEvent based on the input date building name and room number" @Produce json @Param date path string true "date (ISO format) to retrieve astra events" @Param building path string true "building abbreviation of event locations" @Param room path string true "room number for event" @Success 200 {object} schema.APIResponse[schema.SingleBuildingEvents[schema.AstraEvent]] "All sections with meetings on the specified date in the specified building" @Failure 500 {object} schema.APIResponse[string] "A string describing the error" @Failure 404 {object} schema.APIResponse[string] "A string describing the error"

func AutocompleteDAG

func AutocompleteDAG(c *gin.Context)

@Id autocompleteDAG @Router /autocomplete/dag [get] @Tags Other @Description "Returns an aggregation of courses for use in generating autocomplete DAGs" @Produce json @Success 200 {object} schema.APIResponse[[]schema.Autocomplete] "An aggregation of courses for use in generating autocomplete DAGs" @Failure 500 {object} schema.APIResponse[string] "A string describing the error"

func BucketInfo

func BucketInfo(c *gin.Context)

@Id bucketInfo @Router /storage/{bucket} [get] @Tags Internal @Description "Get info on a bucket. This route is restricted to only Nebula Labs internal Projects." @Param bucket path string true "Name of the bucket" @Param x-storage-key header string true "The internal storage key" @Success 200 {object} schema.APIResponse[schema.BucketInfo] "The bucket's info" @Failure 500 {object} schema.APIResponse[string] "A string describing the error"

func Budget

func Budget(c *gin.Context)

@Id Budget @Router /budget/{year} [get] @Tags Other @Description "Returns discal year Budget based on the input year" @Produce json @Param year path string true "year to retrieve budget for" @Success 200 {object} schema.APIResponse[schema.Budget] "Single budget from the given fiscal year" @Failure 500 {object} schema.APIResponse[string] "A string describing the error" @Failure 404 {object} schema.APIResponse[string] "A string describing the error"

func ClubDirectoryInfo

func ClubDirectoryInfo(c *gin.Context)

@Id clubGet @Router /club/{id} [get] @Tags Clubs @Description "Returns the directory info for given club." @Produce json @Param id path string true "ID of the club to get" @Success 200 {object} schema.APIResponse[schema.Club] "A club" @Failure 500 {object} schema.APIResponse[string] "A string describing the error" @Failure 400 {object} schema.APIResponse[string] "A string describing the error"

func ClubSearch

func ClubSearch(c *gin.Context)

@Id clubSearch @Router /club/search [get] @Tags Clubs @Description "Returns list of clubs matching the search string" @Produce json @Param q query string true "Search string" @Success 200 {object} schema.APIResponse[[]schema.Club] "List of matching clubs" @Failure 500 {object} schema.APIResponse[string] "A string describing the error" @Failure 400 {object} schema.APIResponse[string] "A string describing the error"

func CometCalendarEvents

func CometCalendarEvents(c *gin.Context)

@Id CometCalendarEvents @Router /calendar/{date} [get] @Tags Events @Description "Returns CometCalendarEvent based on the input date" @Produce json @Param date path string true "date (ISO format) to retrieve comet calendar events" @Success 200 {object} schema.APIResponse[schema.MultiBuildingEvents[schema.Event]] "All CometCalendarEvents with events on the inputted date" @Failure 500 {object} schema.APIResponse[string] "A string describing the error"

func CometCalendarEventsByBuilding

func CometCalendarEventsByBuilding(c *gin.Context)

@Id CometCalendarEventsByBuilding @Router /calendar/{date}/{building} [get] @Tags Events @Description "Returns CometCalendarEvent based on the input date and building name" @Produce json @Param date path string true "date (ISO format) to retrieve comet calendar events" @Param building path string true "building abbreviation of event locations" @Success 200 {object} schema.APIResponse[schema.SingleBuildingEvents[schema.Event]] "All events on the specified date in the specified building" @Failure 500 {object} schema.APIResponse[string] "A string describing the error" @Failure 404 {object} schema.APIResponse[string] "A string describing the error"

func CometCalendarEventsByBuildingAndRoom

func CometCalendarEventsByBuildingAndRoom(c *gin.Context)

@Id CometCalendarEventsByBuildingAndRoom @Router /calendar/{date}/{building}/{room} [get] @Tags Events @Description "Returns CometCalendarEvent based on the input date building name and room number" @Produce json @Param date path string true "date (ISO format) to retrieve comet calendar events" @Param building path string true "building abbreviation of event locations" @Param room path string true "room number for event" @Success 200 {object} schema.APIResponse[schema.RoomEvents[schema.Event]] "All events on the specified date in the specified building and room" @Failure 500 {object} schema.APIResponse[string] "A string describing the error" @Failure 404 {object} schema.APIResponse[string] "A string describing the error"

func CourseAll

func CourseAll(c *gin.Context)

@Id courseAll @Router /course/all [get] @Tags Courses @Description "Returns all courses" @Produce json @Success 200 {object} schema.APIResponse[[]schema.Course] "All courses" @Failure 500 {object} schema.APIResponse[string] "A string describing the error"

func CourseById

func CourseById(c *gin.Context)

@Id courseById @Router /course/{id} [get] @Tags Courses @Description "Returns the course with given ID" @Produce json @Param id path string true "ID of the course to get" @Success 200 {object} schema.APIResponse[schema.Course] "A course" @Failure 500 {object} schema.APIResponse[string] "A string describing the error"

func CourseProfessorById

func CourseProfessorById(c *gin.Context)

@Id courseProfessorById @Router /course/{id}/professors [get] @Tags Courses @Description "Returns the all of the professors of the course with given ID" @Produce json @Param id path string true "ID of the course to get" @Success 200 {object} schema.APIResponse[[]schema.Professor] "A list of professors" @Failure 500 {object} schema.APIResponse[string] "A string describing the error" @Failure 400 {object} schema.APIResponse[string] "A string describing the error"

func CourseProfessorSearch

func CourseProfessorSearch(c *gin.Context)

@Id courseProfessorSearch @Router /course/professors [get] @Tags Courses @Description "Returns paginated list of professors of all the courses matching the query's string-typed key-value pairs. See former_offset and latter_offset for pagination details." @Produce json @Param former_offset query number false "The starting position of the current page of courses (e.g. For starting at the 17th course, former_offset=16)." @Param latter_offset query number false "The starting position of the current page of professors (e.g. For starting at the 4th professor, latter_offset=3)." @Param course_number query string false "The course's official number" @Param subject_prefix query string false "The course's subject prefix" @Param title query string false "The course's title" @Param description query string false "The course's description" @Param school query string false "The course's school" @Param credit_hours query string false "The number of credit hours awarded by successful completion of the course" @Param class_level query string false "The level of education that this course course corresponds to" @Param activity_type query string false "The type of class this course corresponds to" @Param grading query string false "The grading status of this course" @Param internal_course_number query string false "The internal (university) number used to reference this course" @Param lecture_contact_hours query string false "The weekly contact hours in lecture for a course" @Param offering_frequency query string false "The frequency of offering a course" @Success 200 {object} schema.APIResponse[[]schema.Professor] "A list of professors" @Failure 500 {object} schema.APIResponse[string] "A string describing the error" @Failure 400 {object} schema.APIResponse[string] "A string describing the error"

func CourseSearch

func CourseSearch(c *gin.Context)

@Id courseSearch @Router /course [get] @Tags Courses @Description "Returns paginated list of courses matching the query's string-typed key-value pairs. See offset for more details on pagination." @Produce json @Param offset query number false "The starting position of the current page of courses (e.g. For starting at the 17th course, offset=16)." @Param course_number query string false "The course's official number" @Param subject_prefix query string false "The course's subject prefix" @Param title query string false "The course's title" @Param description query string false "The course's description" @Param school query string false "The course's school" @Param credit_hours query string false "The number of credit hours awarded by successful completion of the course" @Param class_level query string false "The level of education that this course course corresponds to" @Param activity_type query string false "The type of class this course corresponds to" @Param grading query string false "The grading status of this course" @Param internal_course_number query string false "The internal (university) number used to reference this course" @Param lecture_contact_hours query string false "The weekly contact hours in lecture for a course" @Param offering_frequency query string false "The frequency of offering a course" @Success 200 {object} schema.APIResponse[[]schema.Course] "A list of courses" @Failure 500 {object} schema.APIResponse[string] "A string describing the error" @Failure 400 {object} schema.APIResponse[string] "A string describing the error"

func CourseSectionById

func CourseSectionById(c *gin.Context)

@Id courseSectionById @Router /course/{id}/sections [get] @Tags Courses @Description "Returns the all of the sections of the course with given ID" @Produce json @Param id path string true "ID of the course to get" @Success 200 {object} schema.APIResponse[[]schema.Section] "A list of sections" @Failure 500 {object} schema.APIResponse[string] "A string describing the error" @Failure 400 {object} schema.APIResponse[string] "A string describing the error"

func CourseSectionSearch

func CourseSectionSearch(c *gin.Context)

@Id courseSectionSearch @Router /course/sections [get] @Tags Courses @Description "Returns paginated list of sections of all the courses matching the query's string-typed key-value pairs. See former_offset and latter_offset for pagination details." @Produce json @Param former_offset query number false "The starting position of the current page of courses (e.g. For starting at the 17th course, former_offset=16)." @Param latter_offset query number false "The starting position of the current page of sections (e.g. For starting at the 4th section, latter_offset=3)." @Param course_number query string false "The course's official number" @Param subject_prefix query string false "The course's subject prefix" @Param title query string false "The course's title" @Param description query string false "The course's description" @Param school query string false "The course's school" @Param credit_hours query string false "The number of credit hours awarded by successful completion of the course" @Param class_level query string false "The level of education that this course course corresponds to" @Param activity_type query string false "The type of class this course corresponds to" @Param grading query string false "The grading status of this course" @Param internal_course_number query string false "The internal (university) number used to reference this course" @Param lecture_contact_hours query string false "The weekly contact hours in lecture for a course" @Param offering_frequency query string false "The frequency of offering a course" @Success 200 {object} schema.APIResponse[[]schema.Section] "A list of sections" @Failure 500 {object} schema.APIResponse[string] "A string describing the error" @Failure 400 {object} schema.APIResponse[string] "A string describing the error"

func DeleteBucket

func DeleteBucket(c *gin.Context)

@Id deleteBucket @Router /storage/{bucket} [delete] @Tags Internal @Description "Delete a bucket. This route is restricted to only Nebula Labs internal Projects." @Param bucket path string true "Name of the bucket" @Param x-storage-key header string true "The internal storage key" @Success 200 {object} schema.APIResponse[int] "The number of objects that were in the deleted bucket" @Failure 500 {object} schema.APIResponse[string] "A string describing the error"

func DeleteObject

func DeleteObject(c *gin.Context)

@Id deleteObject @Router /storage/{bucket}/{objectID} [delete] @Tags Internal @Description "Delete an object from a bucket. This route is restricted to only Nebula Labs internal Projects." @Param bucket path string true "Name of the bucket" @Param objectID path string true "ID of the object" @Param x-storage-key header string true "The internal storage key" @Success 200 {object} schema.APIResponse[int] "Placeholder response, always set to 1" @Failure 500 {object} schema.APIResponse[string] "A string describing the error"

func DiscountSearch

func DiscountSearch(c *gin.Context)

@Id discountPrograms @Router /discountPrograms [get] @Tags Discounts @Description "Returns list of discounts filtered using field-specific keyword searches or full-text search." @Produce json @Param category query string false "The discount's category (exact match with suggestions)." @Param business query string false "The discount's business contains this keyword (case-insensitive)." @Param address query string false "The discount's address contains this keyword (case-insensitive)." @Param discount query string false "The discount's discount contains this keyword (case-insensitive)." @Param q query string false "Full-text search, must be used alone." @Success 200 {object} schema.APIResponse[[]schema.DiscountProgram] "A list of discounts" @Failure 500 {object} schema.APIResponse[string] "A string describing the error" @Failure 400 {object} schema.APIResponse[string] "A string describing the error"

func Events

func Events(c *gin.Context)

@Id events @Router /events/{date} [get] @Tags Events @Description "Returns all sections with meetings on the specified date" @Produce json @Param date path string true "ISO date of the set of events to get" @Success 200 {object} schema.APIResponse[schema.MultiBuildingEvents[schema.SectionWithTime]] "All sections with meetings on the specified date" @Failure 500 {object} schema.APIResponse[string] "A string describing the error"

func EventsByBuilding

func EventsByBuilding(c *gin.Context)

@Id eventsByBuilding @Router /events/{date}/{building} [get] @Tags Events @Description "Returns all sections with meetings on the specified date in the specified building" @Produce json @Param date path string true "ISO date of the set of events to get" @Param building path string true "building abbreviation of event locations" @Success 200 {object} schema.APIResponse[schema.SingleBuildingEvents[schema.SectionWithTime]] "All sections with meetings on the specified date in the specified building" @Failure 500 {object} schema.APIResponse[string] "A string describing the error" @Failure 404 {object} schema.APIResponse[string] "A string describing the error"

func EventsByRoom

func EventsByRoom(c *gin.Context)

@Id eventsByRoom @Router /events/{date}/{building}/{room} [get] @Tags Events @Description "Returns all sections with meetings on the specified date in the specified building and room" @Produce json @Param date path string true "ISO date of the set of events to get" @Param building path string true "building abbreviation of the event location" @Param room path string true "room number" @Success 200 {object} schema.APIResponse[schema.RoomEvents[schema.SectionWithTime]] "All sections with meetings on the specified date in the specified building and room" @Failure 500 {object} schema.APIResponse[string] "A string describing the error" @Failure 404 {object} schema.APIResponse[string] "A string describing the error"

func GradeAggregationSemester

func GradeAggregationSemester(c *gin.Context)

@Id gradeAggregationBySemester @Router /grades/semester [get] @Tags Grades @Description "Returns grade distributions aggregated by semester" @Produce json @Param prefix query string false "The course's subject prefix" @Param number query string false "The course's official number" @Param first_name query string false "The professor's first name" @Param last_name query string false "The professors's last name" @Param section_number query string false "The number of the section" @Success 200 {object} schema.APIResponse[[]schema.GradeData] "An array of grade distributions for each semester included" @Failure 500 {object} schema.APIResponse[string] "A string describing the error" @Failure 400 {object} schema.APIResponse[string] "A string describing the error"

func GradesAggregationOverall

func GradesAggregationOverall(c *gin.Context)

@Id gradeAggregationOverall @Router /grades/overall [get] @Tags Grades @Description "Returns the overall grade distribution" @Produce json @Param prefix query string false "The course's subject prefix" @Param number query string false "The course's official number" @Param first_name query string false "The professor's first name" @Param last_name query string false "The professors's last name" @Param section_number query string false "The number of the section" @Success 200 {object} schema.APIResponse[[]int] "A grade distribution array" @Failure 500 {object} schema.APIResponse[string] "A string describing the error" @Failure 400 {object} schema.APIResponse[string] "A string describing the error"

func GradesAggregationSectionType

func GradesAggregationSectionType(c *gin.Context)

@Id gradeAggregationSectionType @Router /grades/semester/sectionType [get] @Tags Grades @Description "Returns the grade distributions aggregated by semester and broken down into section type" @Produce json @Param prefix query string false "The course's subject prefix" @Param number query string false "The course's official number" @Param first_name query string false "The professor's first name" @Param last_name query string false "The professors's last name" @Param section_number query string false "The number of the section" @Success 200 {object} schema.APIResponse[[]schema.TypedGradeData] "An array of grade distributions for each section type for each semester included" @Failure 500 {object} schema.APIResponse[string] "A string describing the error" @Failure 400 {object} schema.APIResponse[string] "A string describing the error"

func GradesByCourseID

func GradesByCourseID(c *gin.Context)

@Id GradesByCourseID @Router /course/{id}/grades [get] @Tags Courses @Description "Returns the overall grade distribution for a course" @Produce json @Param id path string true "ID of course to get grades for" @Success 200 {object} schema.APIResponse[[]int] "A grade distribution array for the course" @Failure 500 {object} schema.APIResponse[string] "A string describing the error" @Failure 400 {object} schema.APIResponse[string] "A string describing the error"

func GradesByProfessorID

func GradesByProfessorID(c *gin.Context)

@Id GradesByProfessorID @Router /professor/{id}/grades [get] @Tags Professors @Description "Returns the overall grade distribution for a professor" @Produce json @Param id path string true "ID of professor to get grades for" @Success 200 {object} schema.APIResponse[[]int] "A grade distribution array for the professor" @Failure 500 {object} schema.APIResponse[string] "A string describing the error" @Failure 400 {object} schema.APIResponse[string] "A string describing the error"

func GradesBySectionID

func GradesBySectionID(c *gin.Context)

@Id GradesBySectionID @Router /section/{id}/grades [get] @Tags Sections @Description "Returns the overall grade distribution for a section" @Produce json @Param id path string true "ID of section to get grades for" @Success 200 {object} schema.APIResponse[[]int] "A grade distribution array for the section" @Failure 500 {object} schema.APIResponse[string] "A string describing the error" @Failure 400 {object} schema.APIResponse[string] "A string describing the error"

func MazevoEvents

func MazevoEvents(c *gin.Context)

@Id MazevoEvents @Router /mazevo/{date} [get] @Tags Events @Description "Returns MazevoEvent based on the input date" @Produce json @Param date path string true "date (ISO format) to retrieve mazevo events" @Success 200 {object} schema.APIResponse[schema.MultiBuildingEvents[schema.MazevoEvent]] "All MazevoEvents with events on the inputted date" @Failure 500 {object} schema.APIResponse[string] "A string describing the error"

func MazevoEventsByBuilding

func MazevoEventsByBuilding(c *gin.Context)

@Id mazevoEventsByBuilding @Router /mazevo/{date}/{building} [get] @Tags Events @Description "Returns all sections with MazevoEvent meetings on the specified date in the specified building" @Produce json @Param date path string true "date (ISO format) to retrieve mazevo events" @Param building path string true "building abbreviation of the event location" @Success 200 {object} schema.APIResponse[schema.MultiBuildingEvents[schema.MazevoEvent]] "All MazevoEvents sections with meetings on the specified date in the specified building" @Failure 500 {object} schema.APIResponse[string] "A string describing the error" @Failure 404 {object} schema.APIResponse[string] "A string describing the error"

func MazevoEventsByRoom

func MazevoEventsByRoom(c *gin.Context)

@Id mazevoEventsByRoom @Router /mazevo/{date}/{building}/{room} [get] @Tags Events @Description "Returns all sections with MazevoEvent meetings on the specified date in the specified building and room" @Produce json @Param date path string true "date (ISO format) to retrieve mazevo events" @Param building path string true "building abbreviation of the event location" @Param room path string true "room number" @Success 200 {object} schema.APIResponse[schema.MultiBuildingEvents[schema.MazevoEvent]] "All MazevoEvents sections with meetings on the specified date in the specified building" @Failure 500 {object} schema.APIResponse[string] "A string describing the error" @Failure 404 {object} schema.APIResponse[string]

func ObjectInfo

func ObjectInfo(c *gin.Context)

@Id objectInfo @Router /storage/{bucket}/{objectID} [get] @Tags Internal @Description "Get info on an object in a bucket. This route is restricted to only Nebula Labs internal Projects." @Param bucket path string true "Name of the bucket" @Param objectID path string true "ID of the object" @Param x-storage-key header string true "The internal storage key" @Success 200 {object} schema.APIResponse[schema.ObjectInfo] "The object's info" @Failure 500 {object} schema.APIResponse[string] "A string describing the error"

func ObjectSignedURL

func ObjectSignedURL(c *gin.Context)

@Id objectUploadURL @Router /storage/{bucket}/{objectID}/url [put] @Tags Internal @Accept json @Description "Create's a new signed URL for target object" @Param bucket path string true "Name of the bucket" @Param objectID path string true "ID of the object" @Param body body schema.ObjectSignedURLBody true "Request body" @Param x-storage-key header string true "The internal storage key" @Success 200 {object} schema.APIResponse[string] "Presigned url for the target Object" @Failure 500 {object} schema.APIResponse[string] "A string describing the error"

func PostObject

func PostObject(c *gin.Context)

@Id postObject @Router /storage/{bucket}/{objectID} [post] @Tags Internal @Description "Upload an object to a bucket. This route is restricted to only Nebula Labs internal Projects." @Param bucket path string true "Name of the bucket" @Param objectID path string true "ID of the object" @Param data body string true "The data to upload" @Param x-storage-key header string true "The internal storage key" @Success 200 {object} schema.APIResponse[schema.ObjectInfo] "The object's info" @Failure 500 {object} schema.APIResponse[string] "A string describing the error"

func Preflight

func Preflight(c *gin.Context)

func PrettyPrint

func PrettyPrint(pipeline mongo.Pipeline)

PrettyPrint prints the Mongo pipeline in log with a specific format. This is used strictly for testing.

Credit: https://www.mongodb.com/community/forums/t/pretty-print-golang-pipelines/213173?msockid=23090051006c64c83c6a16a401496501

func ProfessorAll

func ProfessorAll(c *gin.Context)

@Id professorAll @Router /professor/all [get] @Tags Professors @Description "Returns all professors" @Produce json @Success 200 {object} schema.APIResponse[[]schema.Professor] "All professors" @Failure 500 {object} schema.APIResponse[string] "A string describing the error"

func ProfessorById

func ProfessorById(c *gin.Context)

@Id professorById @Router /professor/{id} [get] @Tags Professors @Description "Returns the professor with given ID" @Produce json @Param id path string true "ID of the professor to get" @Success 200 {object} schema.APIResponse[schema.Professor] "A professor" @Failure 500 {object} schema.APIResponse[string] "A string describing the error" @Failure 400 {object} schema.APIResponse[string] "A string describing the error"

func ProfessorCourseById

func ProfessorCourseById(c *gin.Context)

@Id professorCourseById @Router /professor/{id}/courses [get] @Tags Professors @Description "Returns all the courses taught by the professor with given ID" @Produce json @Param id path string true "ID of the professor to get" @Success 200 {object} schema.APIResponse[[]schema.Course] "A list of courses" @Failure 500 {object} schema.APIResponse[string] "A string describing the error" @Failure 400 {object} schema.APIResponse[string] "A string describing the error"

func ProfessorCourseSearch

func ProfessorCourseSearch(c *gin.Context)

@Id professorCourseSearch @Router /professor/courses [get] @Tags Professors @Description "Returns paginated list of the courses of all the professors matching the query's string-typed key-value pairs. See former_offset and latter_offset for pagination details." @Produce json @Param former_offset query number false "The starting position of the current page of professors (e.g. For starting at the 17th professor, former_offset=16)." @Param latter_offset query number false "The starting position of the current page of courses (e.g. For starting at the 4th course, latter_offset=3)." @Param first_name query string false "The professor's first name" @Param last_name query string false "The professor's last name" @Param titles query string false "One of the professor's title" @Param email query string false "The professor's email address" @Param phone_number query string false "The professor's phone number" @Param office.building query string false "The building of the location of the professor's office" @Param office.room query string false "The room of the location of the professor's office" @Param office.map_uri query string false "A hyperlink to the UTD room locator of the professor's office" @Param profile_uri query string false "A hyperlink pointing to the professor's official university profile" @Param image_uri query string false "A link to the image used for the professor on the professor's official university profile" @Param office_hours.start_date query string false "The start date of one of the office hours meetings of the professor" @Param office_hours.end_date query string false "The end date of one of the office hours meetings of the professor" @Param office_hours.meeting_days query string false "One of the days that one of the office hours meetings of the professor" @Param office_hours.start_time query string false "The time one of the office hours meetings of the professor starts" @Param office_hours.end_time query string false "The time one of the office hours meetings of the professor ends" @Param office_hours.modality query string false "The modality of one of the office hours meetings of the professor" @Param office_hours.location.building query string false "The building of one of the office hours meetings of the professor" @Param office_hours.location.room query string false "The room of one of the office hours meetings of the professor" @Param office_hours.location.map_uri query string false "A hyperlink to the UTD room locator of one of the office hours meetings of the professor" @Success 200 {object} schema.APIResponse[[]schema.Professor] "A list of courses" @Failure 500 {object} schema.APIResponse[string] "A string describing the error" @Failure 400 {object} schema.APIResponse[string] "A string describing the error"

func ProfessorSearch

func ProfessorSearch(c *gin.Context)

@Id professorSearch @Router /professor [get] @Tags Professors @Description "Returns paginated list of professors matching the query's string-typed key-value pairs. See offset for more details on pagination." @Produce json @Param offset query number false "The starting position of the current page of professors (e.g. For starting at the 17th professor, offset=16)." @Param first_name query string false "The professor's first name" @Param last_name query string false "The professor's last name" @Param titles query string false "One of the professor's title" @Param email query string false "The professor's email address" @Param phone_number query string false "The professor's phone number" @Param office.building query string false "The building of the location of the professor's office" @Param office.room query string false "The room of the location of the professor's office" @Param office.map_uri query string false "A hyperlink to the UTD room locator of the professor's office" @Param profile_uri query string false "A hyperlink pointing to the professor's official university profile" @Param image_uri query string false "A link to the image used for the professor on the professor's official university profile" @Param office_hours.start_date query string false "The start date of one of the office hours meetings of the professor" @Param office_hours.end_date query string false "The end date of one of the office hours meetings of the professor" @Param office_hours.meeting_days query string false "One of the days that one of the office hours meetings of the professor" @Param office_hours.start_time query string false "The time one of the office hours meetings of the professor starts" @Param office_hours.end_time query string false "The time one of the office hours meetings of the professor ends" @Param office_hours.modality query string false "The modality of one of the office hours meetings of the professor" @Param office_hours.location.building query string false "The building of one of the office hours meetings of the professor" @Param office_hours.location.room query string false "The room of one of the office hours meetings of the professor" @Param office_hours.location.map_uri query string false "A hyperlink to the UTD room locator of one of the office hours meetings of the professor" @Success 200 {object} schema.APIResponse[[]schema.Professor] "A list of professors" @Failure 500 {object} schema.APIResponse[string] "A string describing the error" @Failure 400 {object} schema.APIResponse[string] "A string describing the error"

func ProfessorSectionById

func ProfessorSectionById(c *gin.Context)

@Id professorSectionById @Router /professor/{id}/sections [get] @Tags Professors @Description "Returns all the sections taught by the professor with given ID" @Produce json @Param id path string true "ID of the professor to get" @Success 200 {object} schema.APIResponse[[]schema.Section] "A list of sections" @Failure 500 {object} schema.APIResponse[string] "A string describing the error" @Failure 400 {object} schema.APIResponse[string] "A string describing the error"

func ProfessorSectionSearch

func ProfessorSectionSearch(c *gin.Context)

@Id professorSectionSearch @Router /professor/sections [get] @Tags Professors @Description "Returns paginated list of the sections of all the professors matching the query's string-typed key-value pairs. See former_offset and latter_offset for pagination details." @Produce json @Param former_offset query number false "The starting position of the current page of professors (e.g. For starting at the 17th professor, former_offset=16)." @Param latter_offset query number false "The starting position of the current page of sections (e.g. For starting at the 4th section, latter_offset=3)." @Param first_name query string false "The professor's first name" @Param last_name query string false "The professor's last name" @Param titles query string false "One of the professor's title" @Param email query string false "The professor's email address" @Param phone_number query string false "The professor's phone number" @Param office.building query string false "The building of the location of the professor's office" @Param office.room query string false "The room of the location of the professor's office" @Param office.map_uri query string false "A hyperlink to the UTD room locator of the professor's office" @Param profile_uri query string false "A hyperlink pointing to the professor's official university profile" @Param image_uri query string false "A link to the image used for the professor on the professor's official university profile" @Param office_hours.start_date query string false "The start date of one of the office hours meetings of the professor" @Param office_hours.end_date query string false "The end date of one of the office hours meetings of the professor" @Param office_hours.meeting_days query string false "One of the days that one of the office hours meetings of the professor" @Param office_hours.start_time query string false "The time one of the office hours meetings of the professor starts" @Param office_hours.end_time query string false "The time one of the office hours meetings of the professor ends" @Param office_hours.modality query string false "The modality of one of the office hours meetings of the professor" @Param office_hours.location.building query string false "The building of one of the office hours meetings of the professor" @Param office_hours.location.room query string false "The room of one of the office hours meetings of the professor" @Param office_hours.location.map_uri query string false "A hyperlink to the UTD room locator of one of the office hours meetings of the professor" @Success 200 {object} schema.APIResponse[[]schema.Section] "A list of sections" @Failure 500 {object} schema.APIResponse[string] "A string describing the error" @Failure 400 {object} schema.APIResponse[string] "A string describing the error"

func Rooms

func Rooms(c *gin.Context)

@Id rooms @Router /rooms [get] @Tags Events @Description "Returns all schedulable rooms being used in the current and futures semesters from CourseBook, Astra, and Mazevo" @Produce json @Success 200 {object} schema.APIResponse[[]schema.BuildingRooms] "All schedulable rooms being used in the current and futures semesters from CourseBook, Astra, and Mazevo" @Failure 500 {object} schema.APIResponse[string] "A string describing the error"

func SectionById

func SectionById(c *gin.Context)

@Id sectionById @Router /section/{id} [get] @Tags Sections @Description "Returns the section with given ID" @Produce json @Param id path string true "ID of the section to get" @Success 200 {object} schema.APIResponse[schema.Section] "A section" @Failure 500 {object} schema.APIResponse[string] "A string describing the error" @Failure 400 {object} schema.APIResponse[string] "A string describing the error"

func SectionCourseById

func SectionCourseById(c *gin.Context)

@Id sectionCourseById @Router /section/{id}/course [get] @Tags Sections @Description "Returns the course of the section with given ID" @Produce json @Param id path string true "ID of the section to get" @Success 200 {object} schema.APIResponse[schema.Course] "A course" @Failure 500 {object} schema.APIResponse[string] "A string describing the error" @Failure 400 {object} schema.APIResponse[string] "A string describing the error" @Failure 404 {object} schema.APIResponse[string] "A string describing the error"

func SectionCourseSearch

func SectionCourseSearch(c *gin.Context)

@Id sectionCourseSearch @Router /section/courses [get] @Tags Sections @Description "Returns paginated list of courses of all the sections matching the query's string-typed key-value pairs. See former_offset and latter_offset for pagination details." @Produce json @Param former_offset query number false "The starting position of the current page of sections (e.g. For starting at the 16th section, former_offset=16)." @Param latter_offset query number false "The starting position of the current page of courses (e.g. For starting at the 16th course, latter_offset=16)." @Param section_number query string false "The section's official number" @Param academic_session.name query string false "The name of the academic session of the section" @Param academic_session.start_date query string false "The date of classes starting for the section" @Param academic_session.end_date query string false "The date of classes ending for the section" @Param teaching_assistants.first_name query string false "The first name of one of the teaching assistants of the section" @Param teaching_assistants.last_name query string false "The last name of one of the teaching assistants of the section" @Param teaching_assistants.role query string false "The role of one of the teaching assistants of the section" @Param teaching_assistants.email query string false "The email of one of the teaching assistants of the section" @Param internal_class_number query string false "The internal (university) number used to reference this section" @Param instruction_mode query string false "The instruction modality for this section" @Param meetings.start_date query string false "The start date of one of the section's meetings" @Param meetings.end_date query string false "The end date of one of the section's meetings" @Param meetings.meeting_days query string false "One of the days that one of the section's meetings" @Param meetings.start_time query string false "The time one of the section's meetings starts" @Param meetings.end_time query string false "The time one of the section's meetings ends" @Param meetings.modality query string false "The modality of one of the section's meetings" @Param meetings.location.building query string false "The building of one of the section's meetings" @Param meetings.location.room query string false "The room of one of the section's meetings" @Param meetings.location.map_uri query string false "A hyperlink to the UTD room locator of one of the section's meetings" @Param core_flags query string false "One of core requirement codes this section fulfills" @Param syllabus_uri query string false "A link to the syllabus on the web" @Success 200 {object} schema.APIResponse[[]schema.Course] "A list of courses" @Failure 500 {object} schema.APIResponse[string] "A string describing the error" @Failure 400 {object} schema.APIResponse[string] "A string describing the error"

func SectionProfessorById

func SectionProfessorById(c *gin.Context)

@Id sectionProfessorById @Router /section/{id}/professors [get] @Tags Sections @Description "Returns the paginated list of professors of the section with given ID" @Produce json @Param id path string true "ID of the section to get" @Success 200 {object} schema.APIResponse[[]schema.Professor] "A list of professors" @Failure 500 {object} schema.APIResponse[string] "A string describing the error" @Failure 400 {object} schema.APIResponse[string] "A string describing the error"

func SectionProfessorSearch

func SectionProfessorSearch(c *gin.Context)

@Id sectionProfessorSearch @Router /section/professors [get] @Tags Sections @Description "Returns paginated list of professors of all the sections matching the query's string-typed key-value pairs. See former_offset and latter_offset for pagination details." @Produce json @Param former_offset query number false "The starting position of the current page of sections (e.g. For starting at the 16th sections, former_offset=16)." @Param latter_offset query number false "The starting position of the current page of professors (e.g. For starting at the 16th professor, latter_offset=16)." @Param section_number query string false "The section's official number" @Param academic_session.name query string false "The name of the academic session of the section" @Param academic_session.start_date query string false "The date of classes starting for the section" @Param academic_session.end_date query string false "The date of classes ending for the section" @Param teaching_assistants.first_name query string false "The first name of one of the teaching assistants of the section" @Param teaching_assistants.last_name query string false "The last name of one of the teaching assistants of the section" @Param teaching_assistants.role query string false "The role of one of the teaching assistants of the section" @Param teaching_assistants.email query string false "The email of one of the teaching assistants of the section" @Param internal_class_number query string false "The internal (university) number used to reference this section" @Param instruction_mode query string false "The instruction modality for this section" @Param meetings.start_date query string false "The start date of one of the section's meetings" @Param meetings.end_date query string false "The end date of one of the section's meetings" @Param meetings.meeting_days query string false "One of the days that one of the section's meetings" @Param meetings.start_time query string false "The time one of the section's meetings starts" @Param meetings.end_time query string false "The time one of the section's meetings ends" @Param meetings.modality query string false "The modality of one of the section's meetings" @Param meetings.location.building query string false "The building of one of the section's meetings" @Param meetings.location.room query string false "The room of one of the section's meetings" @Param meetings.location.map_uri query string false "A hyperlink to the UTD room locator of one of the section's meetings" @Param core_flags query string false "One of core requirement codes this section fulfills" @Param syllabus_uri query string false "A link to the syllabus on the web" @Success 200 {object} schema.APIResponse[[]schema.Professor] "A list of professor" @Failure 500 {object} schema.APIResponse[string] "A string describing the error" @Failure 400 {object} schema.APIResponse[string] "A string describing the error"

func SectionSearch

func SectionSearch(c *gin.Context)

@Id sectionSearch @Router /section [get] @Tags Sections @Description "Returns paginated list of sections matching the query's string-typed key-value pairs. See offset for more details on pagination." @Produce json @Param offset query number false "The starting position of the current page of sections (e.g. For starting at the 17th professor, offset=16)." @Param section_number query string false "The section's official number" @Param academic_session.name query string false "The name of the academic session of the section" @Param academic_session.start_date query string false "The date of classes starting for the section" @Param academic_session.end_date query string false "The date of classes ending for the section" @Param teaching_assistants.first_name query string false "The first name of one of the teaching assistants of the section" @Param teaching_assistants.last_name query string false "The last name of one of the teaching assistants of the section" @Param teaching_assistants.role query string false "The role of one of the teaching assistants of the section" @Param teaching_assistants.email query string false "The email of one of the teaching assistants of the section" @Param internal_class_number query string false "The internal (university) number used to reference this section" @Param instruction_mode query string false "The instruction modality for this section" @Param meetings.start_date query string false "The start date of one of the section's meetings" @Param meetings.end_date query string false "The end date of one of the section's meetings" @Param meetings.meeting_days query string false "One of the days that one of the section's meetings" @Param meetings.start_time query string false "The time one of the section's meetings starts" @Param meetings.end_time query string false "The time one of the section's meetings ends" @Param meetings.modality query string false "The modality of one of the section's meetings" @Param meetings.location.building query string false "The building of one of the section's meetings" @Param meetings.location.room query string false "The room of one of the section's meetings" @Param meetings.location.map_uri query string false "A hyperlink to the UTD room locator of one of the section's meetings" @Param core_flags query string false "One of core requirement codes this section fulfills" @Param syllabus_uri query string false "A link to the syllabus on the web" @Success 200 {object} schema.APIResponse[[]schema.Section] "A list of sections" @Failure 500 {object} schema.APIResponse[string] "A string describing the error" @Failure 400 {object} schema.APIResponse[string] "A string describing the error"

func SectionsByRoomDetailed

func SectionsByRoomDetailed(c *gin.Context)

@Id sectionsByRoomDetailed @Router /events/{date}/{building}/{room}/sections [get] @Tags Events @Description "Returns full section objects with meetings on the specified date in the specified building and room" @Produce json @Param date path string true "ISO date of the set of events to get" @Param building path string true "building abbreviation of the event location" @Param room path string true "room number" @Success 200 {object} schema.APIResponse[schema.RoomEvents[schema.Section]] "Full section objects with meetings on the specified date in the specified building and room" @Failure 500 {object} schema.APIResponse[string] "A string describing the error" @Failure 404 {object} schema.APIResponse[string] "A string describing the error"

func TrendsCombinedSectionSearch

func TrendsCombinedSectionSearch(c *gin.Context)

@Id trendsCombinedSectionSearch @Router /combined/sections/trends [get] @Tags Combined @Description "Returns sections matching both course and professor criteria from the combined trends collection. Specialized high-speed convenience endpoint for UTD Trends internal use; limited query flexibility." @Produce json @Param course_number query string true "The course's official number" @Param subject_prefix query string true "The course's subject prefix" @Param first_name query string true "The professor's first name" @Param last_name query string true "The professor's last name" @Success 200 {object} schema.APIResponse[[]schema.Section] "A list of Sections" @Failure 500 {object} schema.APIResponse[string] "A string describing the error"

func TrendsCourseSectionSearch

func TrendsCourseSectionSearch(c *gin.Context)

@Id trendsCourseSectionSearch @Router /course/sections/trends [get] @Tags Courses @Description "Returns all of the given course's sections with Course and Professor data embedded. Specialized high-speed convenience endpoint for UTD Trends internal use; limited query flexibility." @Produce json @Param course_number query string true "The course's official number" @Param subject_prefix query string true "The course's subject prefix" @Success 200 {object} schema.APIResponse[[]schema.Section] "A list of Sections" @Failure 500 {object} schema.APIResponse[string] "A string describing the error"

func TrendsProfessorSectionSearch

func TrendsProfessorSectionSearch(c *gin.Context)

@Id trendsProfessorSectionSearch @Router /professor/sections/trends [get] @Tags Professors @Description "Returns all of the given professor's sections with Course and Professor data embedded. Specialized high-speed convenience endpoint for UTD Trends internal use; limited query flexibility." @Produce json @Param first_name query string true "The professor's first name" @Param last_name query string true "The professor's last name" @Success 200 {object} schema.APIResponse[[]schema.Section] "A list of Sections" @Failure 500 {object} schema.APIResponse[string] "A string describing the error"

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL