Documentation ¶
Overview ¶
Package v1 implements the first version of the Ripple API.
Index ¶
- Constants
- Variables
- func AllClanStatsGET(md common.MethodData) common.CodeMessager
- func BadgeMembersGET(md common.MethodData) common.CodeMessager
- func BadgesGET(md common.MethodData) common.CodeMessager
- func BeatmapGET(md common.MethodData) common.CodeMessager
- func BeatmapRankRequestsStatusGET(md common.MethodData) common.CodeMessager
- func BeatmapRankRequestsSubmitPOST(md common.MethodData) common.CodeMessager
- func BeatmapRankedFrozenFullGET(md common.MethodData) common.CodeMessager
- func BeatmapSetStatusPOST(md common.MethodData) common.CodeMessager
- func BlogPostsGET(md common.MethodData) common.CodeMessager
- func ClanInviteGET(md common.MethodData) common.CodeMessager
- func ClanMembersGET(md common.MethodData) common.CodeMessager
- func ClansGET(md common.MethodData) common.CodeMessager
- func CommentDELETE(md common.MethodData) common.CodeMessager
- func CommentGET(md common.MethodData) common.CodeMessager
- func CommentInfoGET(md common.MethodData) common.CodeMessager
- func CommentPOST(md common.MethodData) common.CodeMessager
- func ErrMissingField(missingFields ...string) common.CodeMessager
- func FriendsAddPOST(md common.MethodData) common.CodeMessager
- func FriendsDelPOST(md common.MethodData) common.CodeMessager
- func FriendsGET(md common.MethodData) common.CodeMessager
- func FriendsWithGET(md common.MethodData) common.CodeMessager
- func Handle404(c *fasthttp.RequestCtx)
- func IsInClanGET(md common.MethodData) common.CodeMessager
- func LeaderboardGET(md common.MethodData) common.CodeMessager
- func LoadAchievementsEvery(db *sqlx.DB, d time.Duration)
- func MetaRestartGET(md common.MethodData) common.CodeMessager
- func MetaUpSinceGET(md common.MethodData) common.CodeMessager
- func MetaUpdateGET(md common.MethodData) common.CodeMessager
- func OldestFirstGET(md common.MethodData) common.CodeMessager
- func PingGET(md common.MethodData) common.CodeMessager
- func PinnedScoreGET(md common.MethodData) common.CodeMessager
- func RAPLogPOST(md common.MethodData) common.CodeMessager
- func ScoreReportPOST(md common.MethodData) common.CodeMessager
- func ScoresGET(md common.MethodData) common.CodeMessager
- func SurpriseMeGET(md common.MethodData) common.CodeMessager
- func TokenFixPrivilegesPOST(md common.MethodData) common.CodeMessager
- func TokenGET(md common.MethodData) common.CodeMessager
- func TokenSelfDeletePOST(md common.MethodData) common.CodeMessager
- func TokenSelfGET(md common.MethodData) common.CodeMessager
- func TotalClanStatsGET(md common.MethodData) common.CodeMessager
- func UserAchievementsGET(md common.MethodData) common.CodeMessager
- func UserEditPOST(md common.MethodData) common.CodeMessager
- func UserFirstGET(md common.MethodData) common.CodeMessager
- func UserFullGET(md common.MethodData) common.CodeMessager
- func UserLookupGET(md common.MethodData) common.CodeMessager
- func UserManageSetAllowedPOST(md common.MethodData) common.CodeMessager
- func UserMostPlayedGET(md common.MethodData) common.CodeMessager
- func UserPinnedDeletePOST(md common.MethodData) common.CodeMessager
- func UserPinnedGET(md common.MethodData) common.CodeMessager
- func UserPinnedPOST(md common.MethodData) common.CodeMessager
- func UserScoresBestGET(md common.MethodData) common.CodeMessager
- func UserScoresRecentGET(md common.MethodData) common.CodeMessager
- func UserSelfGET(md common.MethodData) common.CodeMessager
- func UserSelfUserpagePOST(md common.MethodData) common.CodeMessager
- func UserUserpageGET(md common.MethodData) common.CodeMessager
- func UserWhatsTheIDGET(md common.MethodData) common.CodeMessager
- func UsersGET(md common.MethodData) common.CodeMessager
- func UsersSelfDonorInfoGET(md common.MethodData) common.CodeMessager
- func UsersSelfFavouriteModeGET(md common.MethodData) common.CodeMessager
- func UsersSelfSettingsGET(md common.MethodData) common.CodeMessager
- func UsersSelfSettingsPOST(md common.MethodData) common.CodeMessager
- func WipeUserPOST(md common.MethodData) common.CodeMessager
- type Achievement
- type AchievementUser
- type FirstPlaceResonse
- type FirstPlaceScore
- type Score
Constants ¶
const ( MAX_LENGTH = 380 MIN_LENGTH = 3 )
const APClanQuery = `` /* 913-byte string literal not displayed */
const RXClanQuery = `` /* 913-byte string literal not displayed */
const VNClanQuery = `` /* 997-byte string literal not displayed */
Variables ¶
var ( Err500 = common.SimpleResponse(500, "Oh god Realistik broke something again didnt he") ErrBadJSON = common.SimpleResponse(400, "Your JSON for this request is invalid.") )
Boilerplate errors
Functions ¶
func AllClanStatsGET ¶
func AllClanStatsGET(md common.MethodData) common.CodeMessager
func BadgeMembersGET ¶
func BadgeMembersGET(md common.MethodData) common.CodeMessager
BadgeMembersGET retrieves the people who have a certain badge.
func BadgesGET ¶
func BadgesGET(md common.MethodData) common.CodeMessager
BadgesGET retrieves all the badges on this ripple instance.
func BeatmapGET ¶
func BeatmapGET(md common.MethodData) common.CodeMessager
BeatmapGET retrieves a beatmap.
func BeatmapRankRequestsStatusGET ¶
func BeatmapRankRequestsStatusGET(md common.MethodData) common.CodeMessager
BeatmapRankRequestsStatusGET gets the current status for beatmap ranking requests.
func BeatmapRankRequestsSubmitPOST ¶
func BeatmapRankRequestsSubmitPOST(md common.MethodData) common.CodeMessager
BeatmapRankRequestsSubmitPOST submits a new beatmap for ranking approval.
func BeatmapRankedFrozenFullGET ¶
func BeatmapRankedFrozenFullGET(md common.MethodData) common.CodeMessager
BeatmapRankedFrozenFullGET retrieves all beatmaps with a certain ranked_status_freezed
func BeatmapSetStatusPOST ¶
func BeatmapSetStatusPOST(md common.MethodData) common.CodeMessager
BeatmapSetStatusPOST changes the ranked status of a beatmap, and whether the beatmap ranked status is frozen. Or freezed. Freezed best meme 2k16
func BlogPostsGET ¶
func BlogPostsGET(md common.MethodData) common.CodeMessager
BlogPostsGET retrieves the latest blog posts on the Ripple blog.
func ClanInviteGET ¶
func ClanInviteGET(md common.MethodData) common.CodeMessager
func ClanMembersGET ¶
func ClanMembersGET(md common.MethodData) common.CodeMessager
ClanMembersGET retrieves the people who are in a certain clan.
func ClansGET ¶
func ClansGET(md common.MethodData) common.CodeMessager
clansGET retrieves all the clans on this ripple instance.
func CommentDELETE ¶
func CommentDELETE(md common.MethodData) common.CodeMessager
func CommentGET ¶
func CommentGET(md common.MethodData) common.CodeMessager
func CommentInfoGET ¶
func CommentInfoGET(md common.MethodData) common.CodeMessager
func CommentPOST ¶
func CommentPOST(md common.MethodData) common.CodeMessager
func ErrMissingField ¶
func ErrMissingField(missingFields ...string) common.CodeMessager
ErrMissingField generates a response to a request when some fields in the JSON are missing.
func FriendsAddPOST ¶
func FriendsAddPOST(md common.MethodData) common.CodeMessager
FriendsAddPOST adds an user to the friends.
func FriendsDelPOST ¶
func FriendsDelPOST(md common.MethodData) common.CodeMessager
FriendsDelPOST deletes an user's friend.
func FriendsGET ¶
func FriendsGET(md common.MethodData) common.CodeMessager
FriendsGET is the API request handler for GET /friends. It retrieves an user's friends, and whether the friendship is mutual or not.
func FriendsWithGET ¶
func FriendsWithGET(md common.MethodData) common.CodeMessager
FriendsWithGET checks the current user is friends with the one passed in the request path.
func Handle404 ¶
func Handle404(c *fasthttp.RequestCtx)
Handle404 handles requests with no implemented handlers.
func IsInClanGET ¶
func IsInClanGET(md common.MethodData) common.CodeMessager
func LeaderboardGET ¶
func LeaderboardGET(md common.MethodData) common.CodeMessager
LeaderboardGET gets the leaderboard.
func LoadAchievementsEvery ¶
LoadAchievementsEvery reloads the achievements in the database every given amount of time.
func MetaRestartGET ¶
func MetaRestartGET(md common.MethodData) common.CodeMessager
MetaRestartGET restarts the API with Zero Downtime™.
func MetaUpSinceGET ¶
func MetaUpSinceGET(md common.MethodData) common.CodeMessager
MetaUpSinceGET retrieves the moment the API application was started. Mainly used to get if the API was restarted.
func MetaUpdateGET ¶
func MetaUpdateGET(md common.MethodData) common.CodeMessager
MetaUpdateGET updates the API to the latest version, and restarts it.
func OldestFirstGET ¶
func OldestFirstGET(md common.MethodData) common.CodeMessager
func PingGET ¶
func PingGET(md common.MethodData) common.CodeMessager
PingGET is a message to check with the API that we are logged in, and know what are our privileges.
func PinnedScoreGET ¶
func PinnedScoreGET(md common.MethodData) common.CodeMessager
func RAPLogPOST ¶
func RAPLogPOST(md common.MethodData) common.CodeMessager
RAPLogPOST creates a new entry in the RAP logs
func ScoreReportPOST ¶
func ScoreReportPOST(md common.MethodData) common.CodeMessager
ScoreReportPOST creates a new report for a score
func ScoresGET ¶
func ScoresGET(md common.MethodData) common.CodeMessager
ScoresGET retrieves the top scores for a certain beatmap.
func SurpriseMeGET ¶
func SurpriseMeGET(md common.MethodData) common.CodeMessager
SurpriseMeGET generates cute cats.
... Yes.
func TokenFixPrivilegesPOST ¶
func TokenFixPrivilegesPOST(md common.MethodData) common.CodeMessager
TokenFixPrivilegesPOST fixes the privileges on the token of the given user, or of all the users if no user is given.
func TokenGET ¶
func TokenGET(md common.MethodData) common.CodeMessager
TokenGET retrieves a list listing all the user's public tokens.
func TokenSelfDeletePOST ¶
func TokenSelfDeletePOST(md common.MethodData) common.CodeMessager
TokenSelfDeletePOST deletes the token the user is connecting with.
func TokenSelfGET ¶
func TokenSelfGET(md common.MethodData) common.CodeMessager
TokenSelfGET retrieves information about the token the user is connecting with.
func TotalClanStatsGET ¶
func TotalClanStatsGET(md common.MethodData) common.CodeMessager
func UserAchievementsGET ¶
func UserAchievementsGET(md common.MethodData) common.CodeMessager
UserAchievementsGET handles requests for retrieving the achievements of a given user.
func UserEditPOST ¶
func UserEditPOST(md common.MethodData) common.CodeMessager
UserEditPOST allows to edit an user's information.
func UserFirstGET ¶
func UserFirstGET(md common.MethodData) common.CodeMessager
func UserFullGET ¶
func UserFullGET(md common.MethodData) common.CodeMessager
UserFullGET gets all of an user's information, with one exception: their userpage.
func UserLookupGET ¶
func UserLookupGET(md common.MethodData) common.CodeMessager
UserLookupGET does a quick lookup of users beginning with the passed querystring value name.
func UserManageSetAllowedPOST ¶
func UserManageSetAllowedPOST(md common.MethodData) common.CodeMessager
UserManageSetAllowedPOST allows to set the allowed status of an user.
func UserMostPlayedGET ¶
func UserMostPlayedGET(md common.MethodData) common.CodeMessager
func UserPinnedDeletePOST ¶
func UserPinnedDeletePOST(md common.MethodData) common.CodeMessager
TODO: make this a delete route instead of post
func UserPinnedGET ¶
func UserPinnedGET(md common.MethodData) common.CodeMessager
func UserPinnedPOST ¶
func UserPinnedPOST(md common.MethodData) common.CodeMessager
func UserScoresBestGET ¶
func UserScoresBestGET(md common.MethodData) common.CodeMessager
UserScoresBestGET retrieves the best scores of an user, sorted by PP if mode is standard and sorted by ranked score otherwise.
func UserScoresRecentGET ¶
func UserScoresRecentGET(md common.MethodData) common.CodeMessager
UserScoresRecentGET retrieves an user's latest scores.
func UserSelfGET ¶
func UserSelfGET(md common.MethodData) common.CodeMessager
UserSelfGET is a shortcut for /users/id/self. (/users/self)
func UserSelfUserpagePOST ¶
func UserSelfUserpagePOST(md common.MethodData) common.CodeMessager
UserSelfUserpagePOST allows to change the current user's userpage.
func UserUserpageGET ¶
func UserUserpageGET(md common.MethodData) common.CodeMessager
UserUserpageGET gets an user's userpage, as in the customisable thing.
func UserWhatsTheIDGET ¶
func UserWhatsTheIDGET(md common.MethodData) common.CodeMessager
UserWhatsTheIDGET is an API request that only returns an user's ID.
func UsersGET ¶
func UsersGET(md common.MethodData) common.CodeMessager
UsersGET is the API handler for GET /users
func UsersSelfDonorInfoGET ¶
func UsersSelfDonorInfoGET(md common.MethodData) common.CodeMessager
UsersSelfDonorInfoGET returns information about the users' donor status
func UsersSelfFavouriteModeGET ¶
func UsersSelfFavouriteModeGET(md common.MethodData) common.CodeMessager
UsersSelfFavouriteModeGET gets the current user's favourite mode
func UsersSelfSettingsGET ¶
func UsersSelfSettingsGET(md common.MethodData) common.CodeMessager
UsersSelfSettingsGET allows to get "sensitive" information about the current user.
func UsersSelfSettingsPOST ¶
func UsersSelfSettingsPOST(md common.MethodData) common.CodeMessager
UsersSelfSettingsPOST allows to modify information about the current user.
func WipeUserPOST ¶
func WipeUserPOST(md common.MethodData) common.CodeMessager
WipeUserPOST wipes an user's scores.
Types ¶
type Achievement ¶
type Achievement struct { ID int `json:"id"` Name string `json:"name"` Desc string `json:"desc"` File string `json:"file"` }
Achievement represents an achievement in the database.
type AchievementUser ¶
type FirstPlaceResonse ¶
type FirstPlaceResonse struct { common.ResponseBase FirstPlaces []FirstPlaceScore `json:"first_places"` Total uint32 `json:"total"` }
type FirstPlaceScore ¶
type Score ¶
type Score struct { ID int `json:"id"` BeatmapMD5 string `json:"beatmap_md5"` Score int64 `json:"score"` MaxCombo int `json:"max_combo"` FullCombo bool `json:"full_combo"` Mods int `json:"mods"` Count300 int `json:"count_300"` Count100 int `json:"count_100"` Count50 int `json:"count_50"` CountGeki int `json:"count_geki"` CountKatu int `json:"count_katu"` CountMiss int `json:"count_miss"` Time common.UnixTimestamp `json:"time"` PlayMode int `json:"play_mode"` Accuracy float64 `json:"accuracy"` PP float32 `json:"pp"` Rank string `json:"rank"` Completed int `json:"completed"` }
Score is a score done on Ripple.