Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrProfileNotFound = errors.New("public profile not found")
ErrProfileNotFound is returned when a public profile is not found (user doesn't exist, is not active, or has not enabled public profile)
Functions ¶
func GetPublicProfile ¶
GetPublicProfile returns the public profile and shared packs for a username @Summary Get public user profile @Description Returns public profile information and shared packs for a user. @Description Returns 404 for non-existent users or users without a public profile (anti-enumeration). @Tags Profiles @Produce json @Param username path string true "Username" @Success 200 {object} PublicProfile @Failure 404 {object} apitypes.ErrorResponse "Profile not found" @Failure 500 {object} apitypes.ErrorResponse "Internal Server Error" @Router /user/{username} [get]
Types ¶
type PublicProfile ¶
type PublicProfile struct {
AccountID uint `json:"account_id"`
Username string `json:"username"`
Firstname string `json:"firstname"`
HasProfileImage bool `json:"has_profile_image"`
ImagePositionX int `json:"image_position_x"`
ImagePositionY int `json:"image_position_y"`
HasBannerImage bool `json:"has_banner_image"`
BannerPositionY int `json:"banner_position_y"`
YoutubeURL *string `json:"youtube_url,omitempty"`
InstagramURL *string `json:"instagram_url,omitempty"`
}
PublicProfile represents the public-facing user profile
type SharedPackSummary ¶
type SharedPackSummary struct {
}
SharedPackSummary represents a shared pack in a public profile