handlers

package
v0.0.0-...-c34cdf8 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFavoriteStopToIdentity

func AddFavoriteStopToIdentity(c *gin.Context)

AddFavoriteStopToIdentity godoc @Summary Add a favorite stop to a user @Description Add a favorite stop to a user @Tags Identity @Produce json @Param provider path string true "Provider" @Param uuid path string true "UUID" @Param stop_number path int true "Stop Number" @Success 200 {object} api.Identity @Router /api/users/{provider}/{uuid}/favorite_stops/{stop_number} [post]

func CreateUser

func CreateUser(c *gin.Context)

CreateUser godoc @Summary Create a new user @Description Create a new user @Tags Identity @Produce json @Param provider path string true "Provider" @Param uuid path string true "UUID" @Success 200 {object} api.Identity @Router /api/users/{provider}/{uuid} [post]

func FindStops

func FindStops(c *gin.Context)

FindStop godoc @Summary Find a stop by text in its name @Description Provide a list of stops that match the text in their name @Tags Bus @Produce json @Param text query string true "Text to search for in stop name" @Success 200 {array} api.Stop @Router /api/stops/find [get]

func FindStopsByLocation

func FindStopsByLocation(c *gin.Context)

FindStopsByLocation godoc @Summary Find a stop by its location @Description Provide a list of stops in a given radius around a location @Tags Bus @Produce json @Param lat query float64 true "Latitude" @Param lon query float64 true "Longitude" @Param radius query float64 true "Radius in meters" @Success 200 {array} api.Stop @Router /api/stops/find/location [get]

func GetNearbyStopsImage

func GetNearbyStopsImage(c *gin.Context)

GetNearbyStopsImage godoc @Summary Get the nearby stops as a PNG image and JSON array @Description Provide the nearby stops for a location and return a PNG image and JSON array @Tags Bus @Produce json @Param lat query float64 true "Latitude" @Param lon query float64 true "Longitude" @Param radius query float64 true "Radius in meters" @Param limit query int false "Limit of stops to return, default 9" @Success 200 {object} api.NearbyStops @Router /api/stops/find/location/image [get]

func GetStop

func GetStop(c *gin.Context)

GetStop godoc @Summary Get a stop by its number @Description Provide a stop by its number @Tags Bus @Produce json @Param stop_number path int true "Stop Number" @Success 200 {object} api.Stop @Router /api/stops/{stop_number} [get]

func GetStopSchedule

func GetStopSchedule(c *gin.Context)

GetStopSchedule godoc @Summary Get the schedule for a stop @Description Provide the schedule for a stop @Tags Bus @Produce json @Param stop_number path int true "Stop Number" @Success 200 {object} api.StopSchedule @Router /api/stops/{stop_number}/schedule [get]

func GetUser

func GetUser(c *gin.Context)

GetUser godoc @Summary Get a user by its UUID for a specific provider @Description Provide a user by its UUID for a specific provider @Tags Identity @Produce json @Param provider path string true "Provider" @Param uuid path string true "UUID" @Success 200 {object} api.Identity @Router /api/users/{provider}/{uuid} [get]

func HealthCheck

func HealthCheck(c *gin.Context)

ListLines godoc @Summary Health endpoint @Description Health endpoint @Tags Health @Produce text/plain @Success 200 {string} string "OK" @Router /health [get]

func ListLines

func ListLines(c *gin.Context)

ListLines godoc @Summary List all of the lines @Description Provide a list of all the lines @Tags Bus @Produce json @Success 200 {array} api.Line @Router /api/lines [get]

func ListStops

func ListStops(c *gin.Context)

ListStops godoc @Summary List all of the stops @Description Provide a list of all the stops @Tags Bus @Produce json @Success 200 {array} api.Stop @Router /api/stops [get]

func RemoveFavoriteStopFromIdentity

func RemoveFavoriteStopFromIdentity(c *gin.Context)

RemoveFavoriteStopFromIdentity godoc @Summary Remove a favorite stop from a user @Description Remove a favorite stop from a user @Tags Identity @Produce json @Param provider path string true "Provider" @Param uuid path string true "UUID" @Param stop_number path int true "Stop Number" @Success 200 {object} api.Identity @Router /api/users/{provider}/{uuid}/favorite_stops/{stop_number} [delete]

func UpdateMetadata

func UpdateMetadata(c *gin.Context)

UpdateMetadata godoc @Summary Update the metadata of a user @Description Update the metadata of a user @Tags Identity @Produce json @Param provider path string true "Provider" @Param uuid path string true "UUID" @Param metadata body string true "Metadata" @Success 200 {object} api.Identity @Router /api/users/{provider}/{uuid}/metadata [put]

Types

This section is empty.

Jump to

Keyboard shortcuts

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