Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BadgeHandler ¶
type BadgeHandler struct {
// contains filtered or unexported fields
}
func NewBadgeHandler ¶
func NewBadgeHandler(summaryService services.ISummaryService, userService services.IUserService) *BadgeHandler
func (*BadgeHandler) Get ¶
func (h *BadgeHandler) Get(w http.ResponseWriter, r *http.Request)
@Summary Get badge data @Description Retrieve total time for a given entity (e.g. a project) within a given range (e.g. one week) in a format compatible with [Shields.io](https://shields.io/endpoint). Requires public data access to be allowed. @ID get-badge @Tags badges @Produce json @Param user path string true "User ID to fetch data for" @Param interval path string true "Interval to aggregate data for" Enums(today, yesterday, week, month, year, 7_days, last_7_days, 30_days, last_30_days, 6_months, last_6_months, 12_months, last_12_months, last_year, any, all_time) @Param filter path string true "Filter to apply (e.g. 'project:wakapi' or 'language:Go')" @Success 200 {object} v1.BadgeData @Router /compat/shields/v1/{user}/{interval}/{filter} [get]
func (*BadgeHandler) RegisterRoutes ¶
func (h *BadgeHandler) RegisterRoutes(router chi.Router)