api

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AbsencesGet

func AbsencesGet(c *gin.Context)

AbsencesGet gin Handler for /absences endpoint

@Summary		List user's absences
@Description	Get user's absences
@Produce		json
@Success		200	{array}		isen.Absence
@Failure		400	{object}	HTTPError
@Failure		500	{object}	HTTPError
@Failure		504	{object}	HTTPError
@Security		ApiKeyAuth
@Router			/absences [get]

func AgendaGet

func AgendaGet(c *gin.Context)

AgendaGet gin Handler for /agenda endpoint

@Summary		Get user's agenda
@Description	Returns a list of all user's courses between start and end timestamps.
@Produce		json
@Param			start	query		string	false	"UNIX Milliseconds when the events in the agenda will begin"
@Param			end		query		string	false	"UNIX Milliseconds when the events in the agenda will end"
@Success		200		{array}		isen.ScheduleEvent
@Failure		400		{object}	HTTPError
@Failure		500		{object}	HTTPError
@Failure		504		{object}	HTTPError
@Security		ApiKeyAuth
@Router			/agenda [get]

func CreateKeyFromContext

func CreateKeyFromContext(c *gin.Context) string

CreateKey creates a package specific key for a given string

func EventAgendaGet added in v0.0.4

func EventAgendaGet(c *gin.Context)

EventAgendaGet gin Handler for /agenda/event/{eventId} endpoint

@Summary		Get informations from a specific event
@Description	Get informations of an agenda event from its ID
@Produce		json
@Param			eventId	path		string	true	"Agenda Event ID"
@Success		200		{object}	isen.ScheduleEventDetails
@Failure		400		{object}	HTTPError
@Failure		500		{object}	HTTPError
@Failure		504		{object}	HTTPError
@Security		ApiKeyAuth
@Router			/agenda/event/{eventId} [get]

func Index

func Index(c *gin.Context)

func NewRouter

func NewRouter() *gin.Engine

func NotationsClassGet added in v0.0.4

func NotationsClassGet(c *gin.Context)

NotationsClassGet gin Handler for /notations/class endpoint

@Summary		List user's class notations
@Description	Get a list of all user's class notes with min, average and max note
@Produce		json
@Success		200	{array}		isen.Notation
@Failure		400	{object}	HTTPError
@Failure		500	{object}	HTTPError
@Failure		504	{object}	HTTPError
@Security		ApiKeyAuth
@Router			/notations/class [get]

func NotationsGet

func NotationsGet(c *gin.Context)

NotationsGet gin Handler for /notations endpoint

@Summary		List user's notations
@Description	Get user's notations
@Produce		json
@Success		200	{array}		isen.Notation
@Failure		400	{object}	HTTPError
@Failure		500	{object}	HTTPError
@Failure		504	{object}	HTTPError
@Security		ApiKeyAuth
@Router			/notations [get]

func PersonalInformationsGet added in v0.0.4

func PersonalInformationsGet(c *gin.Context)

PersonalInformationsGet gin Handler for /personal-informations endpoint

@Summary		List user's personal informations
@Description	Get user's personal informations
@Produce		json
@Success		200	{object}	isen.PersonalInformations
@Failure		400	{object}	HTTPError
@Failure		500	{object}	HTTPError
@Failure		504	{object}	HTTPError
@Security		ApiKeyAuth
@Router			/personal-informations [get]

func TokenPost

func TokenPost(c *gin.Context)

TokenPost gin Handler for /token endpoint

@Summary		Get ISEN Token
@Description	Get ISEN Token needed for every authenticated request
@Accept			json
@Produce		plain
@Param			account	body		aurion.Login	true	"Account credentials"
@Success		200		{string}	string
@Failure		400		{object}	HTTPError
@Failure		401		{object}	HTTPError
@Failure		500		{object}	HTTPError
@Failure		504		{object}	HTTPError
@Router			/token [post]

Types

type HTTPError added in v0.0.6

type HTTPError struct {
	Error string `json:"error" example:"error message"`
}

type Route

type Route struct {
	// Name is the name of this Route.
	Name string
	// Method is the string for the HTTP method. ex) GET, POST etc..
	Method string
	// Pattern is the pattern of the URI.
	Pattern string
	// HandlerFunc is the handler function of this route.
	HandlerFunc gin.HandlerFunc
}

Route is the information for every URI.

type Routes

type Routes []Route

Routes is the list of the generated Route.

Jump to

Keyboard shortcuts

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