Documentation ¶
Index ¶
- func AddFavoriteStopToIdentity(c *gin.Context)
- func CreateUser(c *gin.Context)
- func FindStops(c *gin.Context)
- func FindStopsByLocation(c *gin.Context)
- func GetNearbyStopsImage(c *gin.Context)
- func GetStop(c *gin.Context)
- func GetStopSchedule(c *gin.Context)
- func GetUser(c *gin.Context)
- func HealthCheck(c *gin.Context)
- func ListLines(c *gin.Context)
- func ListStops(c *gin.Context)
- func RemoveFavoriteStopFromIdentity(c *gin.Context)
- func UpdateMetadata(c *gin.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddFavoriteStopToIdentity ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
ListLines godoc @Summary Health endpoint @Description Health endpoint @Tags Health @Produce text/plain @Success 200 {string} string "OK" @Router /health [get]
func ListLines ¶
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 ¶
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 ¶
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 ¶
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.