Documentation ¶
Index ¶
- Constants
- Variables
- func ModsToString(mods Mod) string
- func ModsToStrings(mods Mod) []string
- type BaseDifficultyAttributes
- type Beatmap
- type BeatmapAttributesRequest
- func (r *BeatmapAttributesRequest) AddMods(mods Mod) *BeatmapAttributesRequest
- func (r *BeatmapAttributesRequest) Build() (*BaseDifficultyAttributes, error)
- func (r *BeatmapAttributesRequest) SetMode(mode Ruleset) *BeatmapAttributesRequest
- func (r *BeatmapAttributesRequest) SetMods(mods Mod) *BeatmapAttributesRequest
- type BeatmapCompact
- type BeatmapPlaycountEvent
- type BeatmapRequest
- type BeatmapResponse
- type BeatmapScores
- type BeatmapScoresRequest
- type BeatmapsRequest
- type Beatmapset
- type BeatmapsetApproveEvent
- type BeatmapsetAvailability
- type BeatmapsetCompact
- type BeatmapsetCover
- type BeatmapsetDeleteEvent
- type BeatmapsetDiscussion
- type BeatmapsetGenre
- type BeatmapsetHype
- type BeatmapsetLanguage
- type BeatmapsetNominations
- type BeatmapsetReviveEvent
- type BeatmapsetSearchResponse
- type BeatmapsetSearchSort
- type BeatmapsetUpdateEvent
- type BeatmapsetUploadEvent
- type BeatmapsetWithIDRequest
- type BeatmapsetWithSearchRequest
- func (r *BeatmapsetWithSearchRequest) AnyStatus() *BeatmapsetWithSearchRequest
- func (r *BeatmapsetWithSearchRequest) Build() (*BeatmapsetSearchResponse, error)
- func (r *BeatmapsetWithSearchRequest) SetCursor(cursor *Cursor) *BeatmapsetWithSearchRequest
- func (r *BeatmapsetWithSearchRequest) SetGenre(genre Genre) *BeatmapsetWithSearchRequest
- func (r *BeatmapsetWithSearchRequest) SetLanguage(language Language) *BeatmapsetWithSearchRequest
- func (r *BeatmapsetWithSearchRequest) SetMode(mode Ruleset) *BeatmapsetWithSearchRequest
- func (r *BeatmapsetWithSearchRequest) SetNSFW(nsfw bool) *BeatmapsetWithSearchRequest
- func (r *BeatmapsetWithSearchRequest) SetQuery(query string) *BeatmapsetWithSearchRequest
- func (r *BeatmapsetWithSearchRequest) SetStatus(status RankStatus) *BeatmapsetWithSearchRequest
- func (r *BeatmapsetWithSearchRequest) SetStoryboard(storyboard bool) *BeatmapsetWithSearchRequest
- func (r *BeatmapsetWithSearchRequest) SetVideo(video bool) *BeatmapsetWithSearchRequest
- func (r *BeatmapsetWithSearchRequest) SortBy(sort BeatmapsetSearchSort, descending bool) *BeatmapsetWithSearchRequest
- type Build
- type BuildVersions
- type ChangelogBuildRequest
- type ChangelogBuildResponse
- type ChangelogEntry
- type ChangelogListingRequest
- func (r *ChangelogListingRequest) Build() (*ChangelogListingResponse, error)
- func (r *ChangelogListingRequest) SetFrom(from string) *ChangelogListingRequest
- func (r *ChangelogListingRequest) SetMaxID(maxID int) *ChangelogListingRequest
- func (r *ChangelogListingRequest) SetMessageFormats(messageFormats []MessageFormat) *ChangelogListingRequest
- func (r *ChangelogListingRequest) SetStream(stream ChangelogStream) *ChangelogListingRequest
- func (r *ChangelogListingRequest) SetTo(to string) *ChangelogListingRequest
- type ChangelogListingResponse
- type ChangelogStream
- type Client
- func (c *Client) GetBeatmap(beatmap int) *BeatmapRequest
- func (c *Client) GetBeatmapAttributes(beatmap int) *BeatmapAttributesRequest
- func (c *Client) GetBeatmapScores(beatmap int) *BeatmapScoresRequest
- func (c *Client) GetBeatmaps(beatmaps []int) *BeatmapsRequest
- func (c *Client) GetBeatmapsetWithID(beatmapsetID int) *BeatmapsetWithIDRequest
- func (c *Client) GetBeatmapsetWithSearch() *BeatmapsetWithSearchRequest
- func (c *Client) GetChangelogBuild(stream string, build string) *ChangelogBuildRequest
- func (c *Client) GetChangelogListing() *ChangelogListingRequest
- func (c *Client) GetDiscussionPosts() *DiscussionPostsRequest
- func (c *Client) GetDiscussionVotes() *DiscussionVotesRequest
- func (c *Client) GetDiscussions() *DiscussionsRequest
- func (c *Client) GetKudosuRanking() *KudosuRankingRequest
- func (c *Client) GetNewsListing() *NewsListingRequest
- func (c *Client) GetNewsPost(news string) *NewsPostRequest
- func (c *Client) GetOwnData() *OwnDataRequest
- func (c *Client) GetPlaylistScores(room, playlist int) *PlaylistScoresRequest
- func (c *Client) GetRanking(mode Ruleset, rankingType RankingType) *RankingRequest
- func (c *Client) GetSpotlights() *SpotlightsRequest
- func (c *Client) GetUser(user string) *UserRequest
- func (c *Client) GetUserBeatmapScore(beatmap int, user int) *UserBeatmapScoreRequest
- func (c *Client) GetUserBeatmapScores(beatmap int, user int) *UserBeatmapScoresRequest
- func (c *Client) GetUserBeatmaps(user int, mapType RankStatus) *UserBeatmapsRequest
- func (c *Client) GetUserKudosu(user int) *UserKudosuRequest
- func (c *Client) GetUserMostPlayed(user int) *UserMostPlayedRequest
- func (c *Client) GetUserRecentActivity(user int) *UserRecentActivityRequest
- func (c *Client) GetUserScores(user int) *UserScoresRequest
- func (c *Client) GetUsers(userIds []int) *UsersRequest
- func (c *Client) GetWikiPage(locale string, path string) *WikiPageRequest
- func (c *Client) LookupBeatmap() *LookupBeatmapRequest
- func (c *Client) LookupChangelogBuild(changelog string) *LookupChangelogBuildRequest
- type Country
- type Cover
- type Cursor
- type DiscussionBaseRequest
- type DiscussionPost
- type DiscussionPostType
- type DiscussionPostsRequest
- func (r *DiscussionPostsRequest) AddType(types DiscussionPostType) *DiscussionPostsRequest
- func (r *DiscussionPostsRequest) Build() (*DiscussionPostsResponse, error)
- func (r *DiscussionPostsRequest) SetDiscussionID(discussionID int) *DiscussionPostsRequest
- func (r *DiscussionPostsRequest) SetLimit(limit int) *DiscussionPostsRequest
- func (r *DiscussionPostsRequest) SetPage(page int) *DiscussionPostsRequest
- func (r *DiscussionPostsRequest) SetSort(sort Sort) *DiscussionPostsRequest
- func (r *DiscussionPostsRequest) SetTypes(types []DiscussionPostType) *DiscussionPostsRequest
- func (r *DiscussionPostsRequest) SetUser(userID int) *DiscussionPostsRequest
- type DiscussionPostsResponse
- type DiscussionStatus
- type DiscussionVote
- type DiscussionVoteDirection
- type DiscussionVotesRequest
- func (r *DiscussionVotesRequest) Build() (*DiscussionVotesResponse, error)
- func (r *DiscussionVotesRequest) SetDiscussionID(discussionID int) *DiscussionVotesRequest
- func (r *DiscussionVotesRequest) SetLimit(limit int) *DiscussionVotesRequest
- func (r *DiscussionVotesRequest) SetPage(page int) *DiscussionVotesRequest
- func (r *DiscussionVotesRequest) SetReceiver(receiverID int) *DiscussionVotesRequest
- func (r *DiscussionVotesRequest) SetScore(score DiscussionVoteDirection) *DiscussionVotesRequest
- func (r *DiscussionVotesRequest) SetSort(sort Sort) *DiscussionVotesRequest
- func (r *DiscussionVotesRequest) SetUser(userID int) *DiscussionVotesRequest
- type DiscussionVotesResponse
- type DiscussionsRequest
- func (r *DiscussionsRequest) AddMessageType(types MessageType) *DiscussionsRequest
- func (r *DiscussionsRequest) Build() (*DiscussionsResponse, error)
- func (r *DiscussionsRequest) SetBeatmapID(beatmapID int) *DiscussionsRequest
- func (r *DiscussionsRequest) SetBeatmapsetID(beatmapsetID int) *DiscussionsRequest
- func (r *DiscussionsRequest) SetBeatmapsetStatus(status DiscussionStatus) *DiscussionsRequest
- func (r *DiscussionsRequest) SetLimit(limit int) *DiscussionsRequest
- func (r *DiscussionsRequest) SetMessageTypes(types []MessageType) *DiscussionsRequest
- func (r *DiscussionsRequest) SetOnlyUnresolved(onlyUnresolved bool) *DiscussionsRequest
- func (r *DiscussionsRequest) SetPage(page int) *DiscussionsRequest
- func (r *DiscussionsRequest) SetSort(sort Sort) *DiscussionsRequest
- func (r *DiscussionsRequest) SetUser(userID int) *DiscussionsRequest
- type DiscussionsResponse
- type EventBase
- type EventBeatmap
- type EventBeatmapset
- type EventType
- type EventUser
- type FailTimes
- type FruitsDifficultyAttributes
- type GenericDifficultyAttributes
- type Genre
- type GetBeatmapsResponse
- type GetUsersResponse
- type GithubUser
- type Grade
- type GradeCounts
- type Group
- type HistoryType
- type KudosuGiver
- type KudosuHistory
- type KudosuPost
- type KudosuRankingRequest
- type KudosuRankingResponse
- type Language
- type LookupBeatmapRequest
- type LookupBeatmapsetResponse
- type LookupChangelogBuildRequest
- type LookupChangelogBuildResponse
- type ManiaDifficultyAttributes
- type Medal
- type MedalEvent
- type MessageFormat
- type MessageType
- type Mod
- type MonthlyPlaycount
- type MultiplayerScore
- type MultiplayerScoreMod
- type MultiplayerScoreStatistics
- type MultiplayerScores
- type MultiplayerScoresParams
- type MultiplayerScoresSort
- type NewsListingRequest
- type NewsListingResponse
- type NewsNavigation
- type NewsPost
- type NewsPostRequest
- type NewsPostResponse
- type NewsSearch
- type NewsSidebar
- type Nomination
- type OsuDifficultyAttributes
- type OwnDataRequest
- type OwnDataResponse
- type Page
- type PlaylistScoresRequest
- func (r *PlaylistScoresRequest) Build() (*MultiplayerScores, error)
- func (r *PlaylistScoresRequest) SetCursorString(cursorString string) *PlaylistScoresRequest
- func (r *PlaylistScoresRequest) SetLimit(limit int) *PlaylistScoresRequest
- func (r *PlaylistScoresRequest) SetSort(sort MultiplayerScoresSort) *PlaylistScoresRequest
- type Playstyle
- type ProfilePage
- type RankEvent
- type RankHighest
- type RankHistory
- type RankLostEvent
- type RankStatus
- type RankingFilter
- type RankingRequest
- func (r *RankingRequest) Build() (*Rankings, error)
- func (r *RankingRequest) SetCountry(country string) *RankingRequest
- func (r *RankingRequest) SetFilter(filter RankingFilter) *RankingRequest
- func (r *RankingRequest) SetSpotlight(spotlight int) *RankingRequest
- func (r *RankingRequest) SetVariant(variant RankingVariant) *RankingRequest
- type RankingType
- type RankingVariant
- type Rankings
- type Ruleset
- type Score
- type ScoreStatistics
- type ScoreType
- type ScoreWeight
- type Sort
- type Spotlight
- type SpotlightType
- type Spotlights
- type SpotlightsRequest
- type StatisticsRulesets
- type SupportAgainEvent
- type SupportFirstEvent
- type SupportGiftEvent
- type TaikoDifficultyAttributes
- type UpdateStream
- type User
- type UserAccountHistory
- type UserAchievement
- type UserActiveTournamentBanner
- type UserBadge
- type UserBeatmapScore
- type UserBeatmapScoreRequest
- type UserBeatmapScores
- type UserBeatmapScoresRequest
- type UserBeatmapsRequest
- type UserBeatmapset
- type UserCompact
- type UserExtended
- type UserGroup
- type UserKudosu
- type UserKudosuRequest
- type UserLevel
- type UserMostPlayedRequest
- type UserMostPlayedResponse
- type UserRecentActivityRequest
- type UserRequest
- type UserScore
- type UserScoresRequest
- func (r *UserScoresRequest) Best() *UserScoresRequest
- func (r *UserScoresRequest) Build() (*[]UserScore, error)
- func (r *UserScoresRequest) Firsts() *UserScoresRequest
- func (r *UserScoresRequest) Pinned() *UserScoresRequest
- func (r *UserScoresRequest) Recent() *UserScoresRequest
- func (r *UserScoresRequest) SetIncludeFails(includeFails bool) *UserScoresRequest
- func (r *UserScoresRequest) SetLimit(limit int) *UserScoresRequest
- func (r *UserScoresRequest) SetOffset(offset int) *UserScoresRequest
- type UserStatistics
- type UsernameChangeEvent
- type UsersRequest
- type WikiPage
- type WikiPageRequest
Constants ¶
const ( MessageTypeSuggestion = "suggestion" MessageTypeProblem = "problem" MessageTypeMapperNote = "mapper_note" MessageTypePraise = "praise" MessageTypeHype = "hype" MessageTypeReview = "review" )
const ( DiscussionPostTypeFirst = "first" DiscussionPostTypeReply = "reply" DiscussionPostTypeSystem = "system" )
const ( DiscussionVoteDirectionUp = "1" DiscussionVoteDirectionDown = "-1" )
const ( SortArtist BeatmapsetSearchSort = "artist" SortFavourites = "favourites" SortPlaycount = "plays" SortRankedDate = "ranked" SortRating = "rating" SortRelevance = "relevance" SortStars = "stars" SortTitle = "title" )
const ( ChangelogStreamStable40 = "stable40" ChangelogStreamBeta40 = "beta40" ChangelogStreamCuttingEdge = "cuttingedge" ChangelogStreamLazer = "lazer" ChangelogStreamWeb = "web" )
const ( MessageFormatHTML = "html" MessageFormatMarkdown = "markdown" )
const ( MultiplayerScoresSortAscending = "score_asc" MultiplayerScoresSortDescending = "score_desc" )
const ( RankingVariant4k = "4k" RankingVariant7k = "7k" )
const ( SortDescending = "id_desc" SortAscending = "id_asc" )
Variables ¶
var ErrInvalidRankStatus = errors.New("not a valid RankStatus")
var ErrInvalidRuleset = errors.New("not a valid Ruleset")
Functions ¶
func ModsToString ¶
func ModsToStrings ¶
Types ¶
type Beatmap ¶
type Beatmap struct { BeatmapCompact Accuracy float32 `json:"accuracy"` AR float32 `json:"ar"` BeatmapsetID int `json:"beatmapset_id"` BPM *float32 `json:"bpm"` Convert bool `json:"convert"` CountCircles int `json:"count_circles"` CountSliders int `json:"count_sliders"` CountSpinners int `json:"count_spinners"` CS float32 `json:"cs"` DeletedAt *time.Time `json:"deleted_at"` Drain float32 `json:"drain"` HitLength int `json:"hit_length"` IsScoreable bool `json:"is_scoreable"` LastUpdated time.Time `json:"last_updated"` ModeInt int `json:"mode_int"` Passcount int `json:"passcount"` Playcount int `json:"playcount"` Ranked int `json:"ranked"` URL string `json:"url"` }
type BeatmapAttributesRequest ¶
type BeatmapAttributesRequest struct { Beatmap int Mods Mod Mode *Ruleset // contains filtered or unexported fields }
func (*BeatmapAttributesRequest) AddMods ¶
func (r *BeatmapAttributesRequest) AddMods(mods Mod) *BeatmapAttributesRequest
func (*BeatmapAttributesRequest) Build ¶
func (r *BeatmapAttributesRequest) Build() (*BaseDifficultyAttributes, error)
func (*BeatmapAttributesRequest) SetMode ¶
func (r *BeatmapAttributesRequest) SetMode(mode Ruleset) *BeatmapAttributesRequest
func (*BeatmapAttributesRequest) SetMods ¶
func (r *BeatmapAttributesRequest) SetMods(mods Mod) *BeatmapAttributesRequest
type BeatmapCompact ¶
type BeatmapPlaycountEvent ¶
type BeatmapPlaycountEvent struct { Beatmap EventBeatmap `json:"beatmap"` Count int `json:"count"` }
type BeatmapRequest ¶
type BeatmapRequest struct { Beatmap int // contains filtered or unexported fields }
func (*BeatmapRequest) Build ¶
func (r *BeatmapRequest) Build() (*BeatmapResponse, error)
type BeatmapResponse ¶
type BeatmapScores ¶
type BeatmapScoresRequest ¶
type BeatmapScoresRequest struct { Beatmap int Mode *Ruleset // contains filtered or unexported fields }
func (*BeatmapScoresRequest) Build ¶
func (r *BeatmapScoresRequest) Build() (*BeatmapScores, error)
func (*BeatmapScoresRequest) SetMode ¶
func (r *BeatmapScoresRequest) SetMode(mode Ruleset) *BeatmapScoresRequest
type BeatmapsRequest ¶
type BeatmapsRequest struct { Beatmaps []int // contains filtered or unexported fields }
func (*BeatmapsRequest) Build ¶
func (r *BeatmapsRequest) Build() (*GetBeatmapsResponse, error)
type Beatmapset ¶
type Beatmapset struct { BeatmapsetCompact Availability BeatmapsetAvailability `json:"availability"` BPM float32 `json:"bpm"` CanBeHyped bool `json:"can_be_hyped"` DeletedAt *time.Time `json:"deleted_at"` DiscussionLocked bool `json:"discussion_locked"` Hype *BeatmapsetHype `json:"hype"` IsScoreable bool `json:"is_scoreable"` LastUpdated time.Time `json:"last_updated"` LegacyThreadURL *string `json:"legacy_thread_url"` NominationsSummary BeatmapsetNominations `json:"nominations_summary"` Ranked int `json:"ranked"` RankedDate *time.Time `json:"ranked_date"` Storyboard bool `json:"storyboard"` SubmittedDate *time.Time `json:"submitted_date"` Tags string `json:"tags"` }
type BeatmapsetApproveEvent ¶
type BeatmapsetApproveEvent struct { Approval RankStatus `json:"approval"` Beatmapset EventBeatmapset `json:"beatmapset"` User EventUser `json:"user"` }
type BeatmapsetAvailability ¶
type BeatmapsetCompact ¶
type BeatmapsetCompact struct { Artist string `json:"artist"` ArtistUnicode *string `json:"artist_unicode"` Covers BeatmapsetCover `json:"covers"` Creator string `json:"creator"` FavouriteCount int `json:"favourite_count"` Hype *BeatmapsetHype `json:"hype"` ID int `json:"id"` NSFW bool `json:"nsfw"` Offset int `json:"offset"` PlayCount int `json:"play_count"` PreviewURL string `json:"preview_url"` Source string `json:"source"` Status string `json:"status"` Spotlight bool `json:"spotlight"` Title string `json:"title"` TitleUnicode string `json:"title_unicode"` UserID int `json:"user_id"` Video bool `json:"video"` }
type BeatmapsetCover ¶
type BeatmapsetDeleteEvent ¶
type BeatmapsetDeleteEvent struct {
Beatmapset EventBeatmapset `json:"beatmapset"`
}
type BeatmapsetDiscussion ¶
type BeatmapsetDiscussion struct { BeatmapID *int `json:"beatmap_id"` BeatmapsetID *int `json:"beatmapset_id"` CanBeResolved bool `json:"can_be_resolved"` CanGrantKudosu bool `json:"can_grant_kudosu"` CreatedAt time.Time `json:"created_at"` DeletedAt *time.Time `json:"deleted_at"` DeletedByID *int `json:"deleted_by_id"` ID int `json:"id"` KudosuDenied bool `json:"kudosu_denied"` LastPostAt time.Time `json:"last_post_at"` MessageType MessageType `json:"message_type"` ParentID *int `json:"parent_id"` Resolved bool `json:"resolved"` Timestamp *int `json:"timestamp"` UpdatedAt time.Time `json:"updated_at"` UserID *int `json:"user_id"` }
type BeatmapsetGenre ¶
type BeatmapsetHype ¶
type BeatmapsetLanguage ¶
type BeatmapsetNominations ¶
type BeatmapsetReviveEvent ¶
type BeatmapsetReviveEvent struct { Beatmapset EventBeatmapset `json:"beatmapset"` User EventUser `json:"user"` }
type BeatmapsetSearchResponse ¶
type BeatmapsetSearchResponse struct { Cursor *Cursor `json:"cursor"` Beatmapsets []struct { Beatmapset Beatmaps []struct { Beatmap Checksum string `json:"checksum"` MaxCombo int `json:"max_combo"` } `json:"beatmaps"` PackTags []string `json:"pack_tags"` } `json:"beatmapsets"` Total int `json:"total"` }
type BeatmapsetSearchSort ¶
type BeatmapsetSearchSort string
type BeatmapsetUpdateEvent ¶
type BeatmapsetUpdateEvent struct { Beatmapset EventBeatmapset `json:"beatmapset"` User EventUser `json:"user"` }
type BeatmapsetUploadEvent ¶
type BeatmapsetUploadEvent struct { Beatmapset EventBeatmapset `json:"beatmapset"` User EventUser `json:"user"` }
type BeatmapsetWithIDRequest ¶
type BeatmapsetWithIDRequest struct { BeatmapsetID int // contains filtered or unexported fields }
func (*BeatmapsetWithIDRequest) Build ¶
func (r *BeatmapsetWithIDRequest) Build() (*LookupBeatmapsetResponse, error)
type BeatmapsetWithSearchRequest ¶
type BeatmapsetWithSearchRequest struct { Query *string Mode *Ruleset Genre *Genre Language *Language Video bool Storyboard bool NSFW bool Sort *BeatmapsetSearchSort Descending bool Cursor *Cursor // contains filtered or unexported fields }
func (*BeatmapsetWithSearchRequest) AnyStatus ¶
func (r *BeatmapsetWithSearchRequest) AnyStatus() *BeatmapsetWithSearchRequest
func (*BeatmapsetWithSearchRequest) Build ¶
func (r *BeatmapsetWithSearchRequest) Build() (*BeatmapsetSearchResponse, error)
func (*BeatmapsetWithSearchRequest) SetCursor ¶
func (r *BeatmapsetWithSearchRequest) SetCursor(cursor *Cursor) *BeatmapsetWithSearchRequest
func (*BeatmapsetWithSearchRequest) SetGenre ¶
func (r *BeatmapsetWithSearchRequest) SetGenre(genre Genre) *BeatmapsetWithSearchRequest
func (*BeatmapsetWithSearchRequest) SetLanguage ¶
func (r *BeatmapsetWithSearchRequest) SetLanguage(language Language) *BeatmapsetWithSearchRequest
func (*BeatmapsetWithSearchRequest) SetMode ¶
func (r *BeatmapsetWithSearchRequest) SetMode(mode Ruleset) *BeatmapsetWithSearchRequest
func (*BeatmapsetWithSearchRequest) SetNSFW ¶
func (r *BeatmapsetWithSearchRequest) SetNSFW(nsfw bool) *BeatmapsetWithSearchRequest
func (*BeatmapsetWithSearchRequest) SetQuery ¶
func (r *BeatmapsetWithSearchRequest) SetQuery(query string) *BeatmapsetWithSearchRequest
func (*BeatmapsetWithSearchRequest) SetStatus ¶
func (r *BeatmapsetWithSearchRequest) SetStatus(status RankStatus) *BeatmapsetWithSearchRequest
func (*BeatmapsetWithSearchRequest) SetStoryboard ¶
func (r *BeatmapsetWithSearchRequest) SetStoryboard(storyboard bool) *BeatmapsetWithSearchRequest
func (*BeatmapsetWithSearchRequest) SetVideo ¶
func (r *BeatmapsetWithSearchRequest) SetVideo(video bool) *BeatmapsetWithSearchRequest
func (*BeatmapsetWithSearchRequest) SortBy ¶
func (r *BeatmapsetWithSearchRequest) SortBy(sort BeatmapsetSearchSort, descending bool) *BeatmapsetWithSearchRequest
type BuildVersions ¶
type ChangelogBuildRequest ¶
type ChangelogBuildRequest struct { Stream string BuildVersion string // contains filtered or unexported fields }
func (*ChangelogBuildRequest) Build ¶
func (r *ChangelogBuildRequest) Build() (*ChangelogBuildResponse, error)
type ChangelogBuildResponse ¶
type ChangelogBuildResponse struct { Build ChangelogEntries []struct { ChangelogEntry GithubUser GithubUser `json:"github_user"` Message *string `json:"message"` MessageHTML *string `json:"message_html"` } `json:"changelog_entries"` Versions BuildVersions `json:"versions"` }
type ChangelogEntry ¶
type ChangelogEntry struct { Category string `json:"category"` CreatedAt *time.Time `json:"created_at"` GithubPullRequestID *int `json:"github_pull_request_id"` GithubURL *string `json:"github_url"` ID *int `json:"id"` Major bool `json:"major"` Repository *string `json:"repository"` Title *string `json:"title"` Type string `json:"type"` URL *string `json:"url"` }
type ChangelogListingRequest ¶
type ChangelogListingRequest struct { From *string MaxID *int Stream *ChangelogStream To *string MessageFormats []MessageFormat // contains filtered or unexported fields }
func (*ChangelogListingRequest) Build ¶
func (r *ChangelogListingRequest) Build() (*ChangelogListingResponse, error)
func (*ChangelogListingRequest) SetFrom ¶
func (r *ChangelogListingRequest) SetFrom(from string) *ChangelogListingRequest
func (*ChangelogListingRequest) SetMaxID ¶
func (r *ChangelogListingRequest) SetMaxID(maxID int) *ChangelogListingRequest
func (*ChangelogListingRequest) SetMessageFormats ¶
func (r *ChangelogListingRequest) SetMessageFormats(messageFormats []MessageFormat) *ChangelogListingRequest
func (*ChangelogListingRequest) SetStream ¶
func (r *ChangelogListingRequest) SetStream(stream ChangelogStream) *ChangelogListingRequest
func (*ChangelogListingRequest) SetTo ¶
func (r *ChangelogListingRequest) SetTo(to string) *ChangelogListingRequest
type ChangelogListingResponse ¶
type ChangelogListingResponse struct { Builds []struct { ChangelogEntries []struct { ChangelogEntry GithubUser GithubUser `json:"github_user"` Message *string `json:"message"` MessageHTML *string `json:"message_html"` } `json:"changelog_entries"` CreatedAt time.Time `json:"created_at"` DisplayVersion string `json:"display_version"` ID int `json:"id"` UpdateStream UpdateStream `json:"update_stream"` Users int `json:"users"` Version string `json:"version"` YoutubeID *string `json:"youtube_id"` } `json:"builds"` Search struct { From *string `json:"from"` Limit int `json:"limit"` MaxID *int `json:"max_id"` Stream *string `json:"stream"` To *string `json:"to"` } `json:"search"` Streams []struct { UpdateStream LatestBuild Build `json:"latest_build"` UserCount int `json:"user_count"` } `json:"streams"` }
type ChangelogStream ¶
type ChangelogStream string
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetBeatmap ¶
func (c *Client) GetBeatmap(beatmap int) *BeatmapRequest
GetBeatmap returns beatmap data for the specified beatmap ID.
func (*Client) GetBeatmapAttributes ¶
func (c *Client) GetBeatmapAttributes(beatmap int) *BeatmapAttributesRequest
GetBeatmapAttributes returns difficulty attributes of beatmap with specific mode and mods combination.
func (*Client) GetBeatmapScores ¶
func (c *Client) GetBeatmapScores(beatmap int) *BeatmapScoresRequest
GetBeatmapScores returns the top scores for a beatmap. Depending on user preferences, this may only show legacy scores.
func (*Client) GetBeatmaps ¶
func (c *Client) GetBeatmaps(beatmaps []int) *BeatmapsRequest
GetBeatmaps returns a list of beatmaps.
func (*Client) GetBeatmapsetWithID ¶
func (c *Client) GetBeatmapsetWithID(beatmapsetID int) *BeatmapsetWithIDRequest
GetBeatmapsetWithID returns a beatmapset, using its ID.
func (*Client) GetBeatmapsetWithSearch ¶
func (c *Client) GetBeatmapsetWithSearch() *BeatmapsetWithSearchRequest
GetBeatmapsetWithSearch returns a beatmapset, using a search query.
func (*Client) GetChangelogBuild ¶
func (c *Client) GetChangelogBuild(stream string, build string) *ChangelogBuildRequest
GetChangelogBuild returns details of the specified build.
func (*Client) GetChangelogListing ¶
func (c *Client) GetChangelogListing() *ChangelogListingRequest
GetChangelogListing returns a listing of update streams, builds, and changelog entries.
func (*Client) GetDiscussionPosts ¶
func (c *Client) GetDiscussionPosts() *DiscussionPostsRequest
GetDiscussionPosts returns the posts of beatmapset discussions.
func (*Client) GetDiscussionVotes ¶
func (c *Client) GetDiscussionVotes() *DiscussionVotesRequest
GetDiscussionVotes returns the votes given to beatmapset discussions.
func (*Client) GetDiscussions ¶
func (c *Client) GetDiscussions() *DiscussionsRequest
GetDiscussions returns a list of beatmapset discussions.
func (*Client) GetKudosuRanking ¶
func (c *Client) GetKudosuRanking() *KudosuRankingRequest
GetKudosuRanking returns the kudosu ranking.
func (*Client) GetNewsListing ¶
func (c *Client) GetNewsListing() *NewsListingRequest
GetNewsListing returns a list of news posts and related metadata.
func (*Client) GetNewsPost ¶
func (c *Client) GetNewsPost(news string) *NewsPostRequest
GetNewsPost returns details of the specified news post.
func (*Client) GetOwnData ¶
func (c *Client) GetOwnData() *OwnDataRequest
GetOwnData is similar to GetUser, but with the authenticated user (token owner) as user id. Requires Authorization Code Grant authentication.
func (*Client) GetPlaylistScores ¶
func (c *Client) GetPlaylistScores(room, playlist int) *PlaylistScoresRequest
func (*Client) GetRanking ¶
func (c *Client) GetRanking(mode Ruleset, rankingType RankingType) *RankingRequest
GetRanking returns the current ranking for the specified type and game mode.
func (*Client) GetSpotlights ¶
func (c *Client) GetSpotlights() *SpotlightsRequest
GetSpotlights returns the list of spotlights.
func (*Client) GetUser ¶
func (c *Client) GetUser(user string) *UserRequest
GetUser returns the details of a user.
func (*Client) GetUserBeatmapScore ¶
func (c *Client) GetUserBeatmapScore(beatmap int, user int) *UserBeatmapScoreRequest
GetUserBeatmapScore returns a user's score on a beatmap.
func (*Client) GetUserBeatmapScores ¶
func (c *Client) GetUserBeatmapScores(beatmap int, user int) *UserBeatmapScoresRequest
GetUserBeatmapScores returns a user's scores on a beatmap.
func (*Client) GetUserBeatmaps ¶
func (c *Client) GetUserBeatmaps(user int, mapType RankStatus) *UserBeatmapsRequest
GetUserBeatmaps returns the beatmaps of a user.
func (*Client) GetUserKudosu ¶
func (c *Client) GetUserKudosu(user int) *UserKudosuRequest
GetUserKudosu returns the kudosu history of a user.
func (*Client) GetUserMostPlayed ¶
func (c *Client) GetUserMostPlayed(user int) *UserMostPlayedRequest
GetUserMostPlayed returns a user's most played beatmaps.
func (*Client) GetUserRecentActivity ¶
func (c *Client) GetUserRecentActivity(user int) *UserRecentActivityRequest
GetUserRecentActivity returns the recent activity of a user.
func (*Client) GetUserScores ¶
func (c *Client) GetUserScores(user int) *UserScoresRequest
GetUserScores returns the scores of a user.
func (*Client) GetUsers ¶
func (c *Client) GetUsers(userIds []int) *UsersRequest
GetUsers returns a list of users.
func (*Client) GetWikiPage ¶
func (c *Client) GetWikiPage(locale string, path string) *WikiPageRequest
GetWikiPage retyrns a page from the wiki.
func (*Client) LookupBeatmap ¶
func (c *Client) LookupBeatmap() *LookupBeatmapRequest
LookupBeatmap returns beatmap.
func (*Client) LookupChangelogBuild ¶
func (c *Client) LookupChangelogBuild(changelog string) *LookupChangelogBuildRequest
LookupChangelogBuild returns details of the specified build.
type DiscussionBaseRequest ¶
type DiscussionPost ¶
type DiscussionPost struct { BeatmapsetDiscussionID int `json:"beatmapset_discussion_id"` CreatedAt time.Time `json:"created_at"` DeletedAt *time.Time `json:"deleted_at"` DeletedByID *int `json:"deleted_by_id"` ID int `json:"id"` LastEditorID *int `json:"last_editor_id"` Message interface{} `json:"message"` System bool `json:"system"` UpdatedAt time.Time `json:"updated_at"` UserID int `json:"user_id"` }
type DiscussionPostType ¶
type DiscussionPostType string
type DiscussionPostsRequest ¶
type DiscussionPostsRequest struct { DiscussionBaseRequest BeatmapsetDiscussionID *int Types []DiscussionPostType User *int }
func (*DiscussionPostsRequest) AddType ¶
func (r *DiscussionPostsRequest) AddType(types DiscussionPostType) *DiscussionPostsRequest
func (*DiscussionPostsRequest) Build ¶
func (r *DiscussionPostsRequest) Build() (*DiscussionPostsResponse, error)
func (*DiscussionPostsRequest) SetDiscussionID ¶
func (r *DiscussionPostsRequest) SetDiscussionID(discussionID int) *DiscussionPostsRequest
func (*DiscussionPostsRequest) SetLimit ¶
func (r *DiscussionPostsRequest) SetLimit(limit int) *DiscussionPostsRequest
func (*DiscussionPostsRequest) SetPage ¶
func (r *DiscussionPostsRequest) SetPage(page int) *DiscussionPostsRequest
func (*DiscussionPostsRequest) SetSort ¶
func (r *DiscussionPostsRequest) SetSort(sort Sort) *DiscussionPostsRequest
func (*DiscussionPostsRequest) SetTypes ¶
func (r *DiscussionPostsRequest) SetTypes(types []DiscussionPostType) *DiscussionPostsRequest
func (*DiscussionPostsRequest) SetUser ¶
func (r *DiscussionPostsRequest) SetUser(userID int) *DiscussionPostsRequest
type DiscussionPostsResponse ¶
type DiscussionPostsResponse struct { Beatmapsets []BeatmapsetCompact `json:"beatmapsets"` CursorString Cursor `json:"cursor_string"` Discussions []BeatmapsetDiscussion `json:"discussions"` Posts []DiscussionPost `json:"posts"` Users []UserCompact `json:"users"` }
type DiscussionStatus ¶
type DiscussionStatus string
const ( DiscussionStatusAll DiscussionStatus = "all" DiscussionStatusRanked DiscussionStatus = "ranked" DiscussionStatusQualified DiscussionStatus = "qualified" DiscussionStatusDisqualified DiscussionStatus = "disqualified" DiscussionStatusNeverQualified DiscussionStatus = "never_qualified" )
type DiscussionVote ¶
type DiscussionVoteDirection ¶
type DiscussionVoteDirection string
type DiscussionVotesRequest ¶
type DiscussionVotesRequest struct { DiscussionBaseRequest BeatmapsetDiscussionID *int Receiver *int `json:"receiver"` Score *DiscussionVoteDirection `json:"score"` User *int `json:"user"` }
func (*DiscussionVotesRequest) Build ¶
func (r *DiscussionVotesRequest) Build() (*DiscussionVotesResponse, error)
func (*DiscussionVotesRequest) SetDiscussionID ¶
func (r *DiscussionVotesRequest) SetDiscussionID(discussionID int) *DiscussionVotesRequest
func (*DiscussionVotesRequest) SetLimit ¶
func (r *DiscussionVotesRequest) SetLimit(limit int) *DiscussionVotesRequest
func (*DiscussionVotesRequest) SetPage ¶
func (r *DiscussionVotesRequest) SetPage(page int) *DiscussionVotesRequest
func (*DiscussionVotesRequest) SetReceiver ¶
func (r *DiscussionVotesRequest) SetReceiver(receiverID int) *DiscussionVotesRequest
func (*DiscussionVotesRequest) SetScore ¶
func (r *DiscussionVotesRequest) SetScore(score DiscussionVoteDirection) *DiscussionVotesRequest
func (*DiscussionVotesRequest) SetSort ¶
func (r *DiscussionVotesRequest) SetSort(sort Sort) *DiscussionVotesRequest
func (*DiscussionVotesRequest) SetUser ¶
func (r *DiscussionVotesRequest) SetUser(userID int) *DiscussionVotesRequest
type DiscussionVotesResponse ¶
type DiscussionVotesResponse struct { CursorString Cursor `json:"cursor_string"` Discussions []BeatmapsetDiscussion `json:"discussions"` Users []UserCompact `json:"users"` Votes []DiscussionVote `json:"votes"` }
type DiscussionsRequest ¶
type DiscussionsRequest struct { DiscussionBaseRequest BeatmapID *int `json:"beatmap_id"` BeatmapsetID *int `json:"beatmapset_id"` BeatmapsetStatus *DiscussionStatus MessageTypes []MessageType `json:"message_types"` OnlyUnresolved *bool `json:"only_unresolved"` User *int `json:"user"` }
func (*DiscussionsRequest) AddMessageType ¶
func (r *DiscussionsRequest) AddMessageType(types MessageType) *DiscussionsRequest
func (*DiscussionsRequest) Build ¶
func (r *DiscussionsRequest) Build() (*DiscussionsResponse, error)
func (*DiscussionsRequest) SetBeatmapID ¶
func (r *DiscussionsRequest) SetBeatmapID(beatmapID int) *DiscussionsRequest
func (*DiscussionsRequest) SetBeatmapsetID ¶
func (r *DiscussionsRequest) SetBeatmapsetID(beatmapsetID int) *DiscussionsRequest
func (*DiscussionsRequest) SetBeatmapsetStatus ¶
func (r *DiscussionsRequest) SetBeatmapsetStatus(status DiscussionStatus) *DiscussionsRequest
func (*DiscussionsRequest) SetLimit ¶
func (r *DiscussionsRequest) SetLimit(limit int) *DiscussionsRequest
func (*DiscussionsRequest) SetMessageTypes ¶
func (r *DiscussionsRequest) SetMessageTypes(types []MessageType) *DiscussionsRequest
func (*DiscussionsRequest) SetOnlyUnresolved ¶
func (r *DiscussionsRequest) SetOnlyUnresolved(onlyUnresolved bool) *DiscussionsRequest
func (*DiscussionsRequest) SetPage ¶
func (r *DiscussionsRequest) SetPage(page int) *DiscussionsRequest
func (*DiscussionsRequest) SetSort ¶
func (r *DiscussionsRequest) SetSort(sort Sort) *DiscussionsRequest
func (*DiscussionsRequest) SetUser ¶
func (r *DiscussionsRequest) SetUser(userID int) *DiscussionsRequest
type DiscussionsResponse ¶
type DiscussionsResponse struct { CursorString Cursor `json:"cursor_string"` Users []UserCompact `json:"users"` Discussions []BeatmapsetDiscussion `json:"discussions"` IncludedDiscussions []BeatmapsetDiscussion `json:"included_discussions"` Beatmapsets []Beatmapset `json:"beatmapsets"` Beatmaps []struct { Beatmap Checksum *string `json:"checksum"` } `json:"beatmaps"` ReviewsConfig struct { MaxBlocks int `json:"max_blocks"` } `json:"reviews_config"` }
type EventBeatmap ¶
type EventBeatmapset ¶
type EventType ¶
type EventType string
const ( EventTypeAchievement EventType = "achievement" EventTypeBeatmapPlaycount EventType = "beatmapPlaycount" EventTypeBeatmapsetApprove EventType = "beatmapsetApprove" EventTypeBeatmapsetDelete EventType = "beatmapsetDelete" EventTypeBeatmapsetRevive EventType = "beatmapsetRevive" EventTypeBeatmapsetUpdate EventType = "beatmapsetUpdate" EventTypeBeatmapsetUpload EventType = "beatmapsetUpload" EventTypeRank EventType = "rank" EventTypeRankLost EventType = "rankLost" EventTypeUserSupportAgain EventType = "userSupportAgain" EventTypeUserSupportFirst EventType = "userSupportFirst" EventTypeUserSupportGift EventType = "userSupportGift" EventTypeUsernameChange EventType = "usernameChange" )
type FruitsDifficultyAttributes ¶
type FruitsDifficultyAttributes struct {
ApproachRate float32 `json:"approach_rate"`
}
type GenericDifficultyAttributes ¶
type GenericDifficultyAttributes struct {
Attributes json.RawMessage `json:"attributes"`
}
type GetBeatmapsResponse ¶
type GetBeatmapsResponse struct {
Beatmaps []BeatmapResponse `json:"beatmaps"`
}
type GetUsersResponse ¶
type GetUsersResponse struct { Users []struct { UserCompact Country `json:"country"` Cover `json:"cover"` Groups []UserGroup `json:"groups"` StatisticsRulesets StatisticsRulesets `json:"statistics_rulesets"` } `json:"users"` }
type GithubUser ¶
type GradeCounts ¶
type HistoryType ¶
type HistoryType string
const ( HistoryTypeNote HistoryType = "note" HistoryTypeRestriction HistoryType = "restriction" HistoryTypeSilence HistoryType = "silence" HistoryTypeTournamentBan HistoryType = "tournament_ban" )
type KudosuGiver ¶
type KudosuHistory ¶
type KudosuHistory struct { ID int `json:"id"` Action string `json:"action"` Amount int `json:"amount"` Model string `json:"model"` CreatedAt time.Time `json:"created_at"` Giver *KudosuGiver `json:"giver"` Post KudosuPost `json:"post"` }
type KudosuPost ¶
type KudosuRankingRequest ¶
type KudosuRankingRequest struct { Page *int `json:"page"` // contains filtered or unexported fields }
func (*KudosuRankingRequest) Build ¶
func (r *KudosuRankingRequest) Build() (*KudosuRankingResponse, error)
func (*KudosuRankingRequest) SetPage ¶
func (r *KudosuRankingRequest) SetPage(page int) *KudosuRankingRequest
type KudosuRankingResponse ¶
type KudosuRankingResponse struct { Ranking []struct { UserCompact Kudosu UserKudosu `json:"kudosu"` } `json:"ranking"` }
type LookupBeatmapRequest ¶
type LookupBeatmapRequest struct { Checksum *string Filename *string ID *int // contains filtered or unexported fields }
func (*LookupBeatmapRequest) Build ¶
func (r *LookupBeatmapRequest) Build() (*BeatmapResponse, error)
func (*LookupBeatmapRequest) SetChecksum ¶
func (r *LookupBeatmapRequest) SetChecksum(checksum string) *LookupBeatmapRequest
func (*LookupBeatmapRequest) SetFilename ¶
func (r *LookupBeatmapRequest) SetFilename(filename string) *LookupBeatmapRequest
func (*LookupBeatmapRequest) SetID ¶
func (r *LookupBeatmapRequest) SetID(id int) *LookupBeatmapRequest
type LookupBeatmapsetResponse ¶
type LookupBeatmapsetResponse struct { Beatmapset Beatmaps []struct { Beatmap Checksum string `json:"checksum"` FailTimes `json:"failtimes"` MaxCombo int `json:"max_combo"` } `json:"beatmaps"` Converts []struct { Beatmap Checksum string `json:"checksum"` FailTimes `json:"failtimes"` } `json:"converts"` CurrentNominations []Nomination `json:"current_nominations"` Description struct { Description string `json:"description"` } `json:"description"` BeatmapsetGenre `json:"genre"` BeatmapsetLanguage `json:"language"` PackTags []string `json:"pack_tags"` Ratings []int `json:"ratings"` RecentFavourites []UserCompact `json:"recent_favourites"` RelatedUsers []UserCompact `json:"related_users"` User UserCompact `json:"user"` }
type LookupChangelogBuildRequest ¶
type LookupChangelogBuildRequest struct { Changelog string Key *string MessageFormats []MessageFormat // contains filtered or unexported fields }
func (*LookupChangelogBuildRequest) Build ¶
func (r *LookupChangelogBuildRequest) Build() (*LookupChangelogBuildResponse, error)
func (*LookupChangelogBuildRequest) SetKey ¶
func (r *LookupChangelogBuildRequest) SetKey(key string) *LookupChangelogBuildRequest
func (*LookupChangelogBuildRequest) SetMessageFormats ¶
func (r *LookupChangelogBuildRequest) SetMessageFormats(messageFormats []MessageFormat) *LookupChangelogBuildRequest
type LookupChangelogBuildResponse ¶
type LookupChangelogBuildResponse struct { Build ChangelogEntries []struct { ChangelogEntry GithubUser GithubUser `json:"github_user"` Message *string `json:"message"` MessageHTML *string `json:"message_html"` } `json:"changelog_entries"` Versions BuildVersions `json:"versions"` }
type ManiaDifficultyAttributes ¶
type ManiaDifficultyAttributes struct {
GreatHitWindow float32 `json:"great_hit_window"`
}
type Medal ¶
type Medal struct { Description string `json:"description"` Grouping string `json:"grouping"` IconURL string `json:"icon_url"` Instructions string `json:"instructions"` MedalID int `json:"id"` Mode *Ruleset `json:"mode"` Name string `json:"name"` Ordering int `json:"ordering"` Slug string `json:"slug"` }
type MedalEvent ¶
type MessageFormat ¶
type MessageFormat string
type MessageType ¶
type MessageType string
type MonthlyPlaycount ¶
type MultiplayerScore ¶
type MultiplayerScore struct { ID int `json:"id"` UserID int `json:"user_id"` RoomID int `json:"room_id"` PlaylistItemID int `json:"playlist_item_id"` BeatmapID int `json:"beatmap_id"` Rank Grade `json:"rank"` TotalScore int `json:"total_score"` Accuracy float32 `json:"accuracy"` MaxCombo int `json:"max_combo"` Mods []MultiplayerScoreMod `json:"mods"` Statistics MultiplayerScoreStatistics `json:"statistics"` Passed bool `json:"passed"` Position *int `json:"position"` User struct { UserCompact Country Country `json:"country"` Cover Cover `json:"cover"` } `json:"user"` }
type MultiplayerScoreMod ¶
type MultiplayerScoreMod struct {
Acronym Mod `json:"acronym"`
}
type MultiplayerScores ¶
type MultiplayerScores struct { CursorString Cursor `json:"cursor"` Params MultiplayerScoresParams `json:"params"` Scores []MultiplayerScore `json:"scores"` Total *int `json:"total"` UserScore *MultiplayerScore `json:"user_score"` }
type MultiplayerScoresParams ¶
type MultiplayerScoresParams struct { Limit int `json:"limit"` Sort MultiplayerScoresSort `json:"sort"` }
type MultiplayerScoresSort ¶
type MultiplayerScoresSort string
type NewsListingRequest ¶
func (*NewsListingRequest) Build ¶
func (r *NewsListingRequest) Build() (*NewsListingResponse, error)
func (*NewsListingRequest) SetLimit ¶
func (r *NewsListingRequest) SetLimit(limit int) *NewsListingRequest
func (*NewsListingRequest) SetYear ¶
func (r *NewsListingRequest) SetYear(year int) *NewsListingRequest
type NewsListingResponse ¶
type NewsListingResponse struct { CursorString Cursor `json:"cursor_string"` NewsPosts []struct { NewsPost Preview string `json:"preview"` } `json:"news_posts"` NewsSidebar NewsSidebar `json:"news_sidebar"` Search NewsSearch `json:"search"` }
type NewsNavigation ¶
type NewsNavigation struct {}
type NewsPostRequest ¶
func (*NewsPostRequest) Build ¶
func (r *NewsPostRequest) Build() (*NewsPostResponse, error)
func (*NewsPostRequest) SetKey ¶
func (r *NewsPostRequest) SetKey(key string) *NewsPostRequest
type NewsPostResponse ¶
type NewsSearch ¶
type NewsSidebar ¶
type Nomination ¶
type OsuDifficultyAttributes ¶
type OsuDifficultyAttributes struct { AimDifficulty float32 `json:"aim_difficulty"` SpeedDifficulty float32 `json:"speed_difficulty"` SpeedNoteCount float32 `json:"speed_note_count"` FlashlightDifficulty float32 `json:"flashlight_difficulty"` SliderFactor float32 `json:"slider_factor"` ApproachRate float32 `json:"approach_rate"` OverallDifficulty float32 `json:"overall_difficulty"` }
type OwnDataRequest ¶
type OwnDataRequest struct { Mode *Ruleset // contains filtered or unexported fields }
func (*OwnDataRequest) Build ¶
func (r *OwnDataRequest) Build() (*OwnDataResponse, error)
func (*OwnDataRequest) SetMode ¶
func (r *OwnDataRequest) SetMode(mode Ruleset) *OwnDataRequest
type OwnDataResponse ¶
type OwnDataResponse struct { UserExtended IsRestricted bool `json:"is_restricted"` SessionVerified bool `json:"session_verified"` StatisticsRulesets StatisticsRulesets `json:"statistics_rulesets"` }
type PlaylistScoresRequest ¶
type PlaylistScoresRequest struct { Room int Playlist int Limit *int Sort *MultiplayerScoresSort CursorString *string // contains filtered or unexported fields }
func (*PlaylistScoresRequest) Build ¶
func (r *PlaylistScoresRequest) Build() (*MultiplayerScores, error)
func (*PlaylistScoresRequest) SetCursorString ¶
func (r *PlaylistScoresRequest) SetCursorString(cursorString string) *PlaylistScoresRequest
func (*PlaylistScoresRequest) SetLimit ¶
func (r *PlaylistScoresRequest) SetLimit(limit int) *PlaylistScoresRequest
func (*PlaylistScoresRequest) SetSort ¶
func (r *PlaylistScoresRequest) SetSort(sort MultiplayerScoresSort) *PlaylistScoresRequest
type ProfilePage ¶
type ProfilePage string
const ( ProfilePageMe ProfilePage = "me" ProfilePageRecentActivity ProfilePage = "recent_activity" ProfilePageBeatmaps ProfilePage = "beatmaps" ProfilePageHistorical ProfilePage = "historical" ProfilePageKudosu ProfilePage = "kudosu" ProfilePageTopRanks ProfilePage = "top_ranks" ProfilePageMedals ProfilePage = "medals" )
type RankEvent ¶
type RankEvent struct { Grade Grade `json:"scoreRank"` Rank int `json:"rank"` Mode Ruleset `json:"mode"` Beatmap EventBeatmap `json:"beatmap"` User EventUser `json:"user"` }
type RankHighest ¶
type RankHistory ¶
type RankLostEvent ¶
type RankLostEvent struct { Mode Ruleset `json:"mode"` Beatmap EventBeatmap `json:"beatmap"` User EventUser `json:"user"` }
type RankStatus ¶
type RankStatus int
ENUM(graveyard = -2, WIP, pending, ranked, approved, qualified, loved)
const ( // RankStatusGraveyard is a RankStatus of type Graveyard. RankStatusGraveyard RankStatus = iota + -2 // RankStatusWIP is a RankStatus of type WIP. RankStatusWIP // RankStatusPending is a RankStatus of type Pending. RankStatusPending // RankStatusRanked is a RankStatus of type Ranked. RankStatusRanked // RankStatusApproved is a RankStatus of type Approved. RankStatusApproved // RankStatusQualified is a RankStatus of type Qualified. RankStatusQualified // RankStatusLoved is a RankStatus of type Loved. RankStatusLoved )
func ParseRankStatus ¶
func ParseRankStatus(name string) (RankStatus, error)
ParseRankStatus attempts to convert a string to a RankStatus.
func (RankStatus) IsValid ¶
func (x RankStatus) IsValid() bool
IsValid provides a quick way to determine if the typed value is part of the allowed enumerated values
func (RankStatus) MarshalText ¶
func (x RankStatus) MarshalText() ([]byte, error)
MarshalText implements the text marshaller method.
func (RankStatus) String ¶
func (x RankStatus) String() string
String implements the Stringer interface.
func (*RankStatus) UnmarshalText ¶
func (x *RankStatus) UnmarshalText(text []byte) error
UnmarshalText implements the text unmarshaller method.
type RankingFilter ¶
type RankingFilter string
const ( RankingFilterAll RankingFilter = "all" RankingFilterFriends RankingFilter = "friends" )
type RankingRequest ¶
type RankingRequest struct { Mode Ruleset Type RankingType Country *string Filter *RankingFilter Spotlight *int Variant *RankingVariant // contains filtered or unexported fields }
func (*RankingRequest) Build ¶
func (r *RankingRequest) Build() (*Rankings, error)
func (*RankingRequest) SetCountry ¶
func (r *RankingRequest) SetCountry(country string) *RankingRequest
func (*RankingRequest) SetFilter ¶
func (r *RankingRequest) SetFilter(filter RankingFilter) *RankingRequest
func (*RankingRequest) SetSpotlight ¶
func (r *RankingRequest) SetSpotlight(spotlight int) *RankingRequest
func (*RankingRequest) SetVariant ¶
func (r *RankingRequest) SetVariant(variant RankingVariant) *RankingRequest
type RankingType ¶
type RankingType string
const ( RankingTypeCharts RankingType = "charts" RankingTypeCountry RankingType = "country" RankingTypePerformance RankingType = "performance" RankingTypeScore RankingType = "score" )
type RankingVariant ¶
type RankingVariant string
type Rankings ¶
type Rankings struct { Beatmapsets *[]Beatmapset `json:"beatmapsets,omitempty"` Cursor Cursor `json:"cursor"` Ranking []struct { UserStatistics User struct { UserCompact Country Country `json:"country"` Cover Cover `json:"cover"` } `json:"user"` } `json:"ranking"` Spotlight *Spotlight `json:"spotlight,omitempty"` Total int `json:"total"` }
type Ruleset ¶
type Ruleset int
ENUM(osu, taiko, fruits, mania)
func ParseRuleset ¶
ParseRuleset attempts to convert a string to a Ruleset.
func (Ruleset) IsValid ¶
IsValid provides a quick way to determine if the typed value is part of the allowed enumerated values
func (Ruleset) MarshalText ¶
MarshalText implements the text marshaller method.
func (*Ruleset) UnmarshalText ¶
UnmarshalText implements the text unmarshaller method.
type Score ¶
type Score struct { ID int `json:"id"` UserID int `json:"user_id"` Accuracy float64 `json:"accuracy"` Mods []string `json:"mods"` Score int `json:"score"` MaxCombo int `json:"max_combo"` Perfect bool `json:"perfect"` Statistics ScoreStatistics `json:"statistics"` Passed bool `json:"passed"` Pp float32 `json:"pp"` Rank Grade `json:"rank"` CreatedAt time.Time `json:"created_at"` Mode Ruleset `json:"mode"` ModeInt int `json:"mode_int"` Replay bool `json:"replay"` }
type ScoreStatistics ¶
type ScoreWeight ¶
type SpotlightType ¶
type SpotlightType string
const ( SpotlightTypeMonthly SpotlightType = "monthly" SpotlightTypeSpotlight SpotlightType = "spotlight" SpotlightTypeTheme SpotlightType = "theme" SpotlightTypeSpecial SpotlightType = "special" SpotlightTypeBestOf SpotlightType = "bestof" )
type Spotlights ¶
type Spotlights struct {
Spotlights []Spotlight `json:"spotlights"`
}
type SpotlightsRequest ¶
type SpotlightsRequest struct {
// contains filtered or unexported fields
}
func (*SpotlightsRequest) Build ¶
func (r *SpotlightsRequest) Build() (*Spotlights, error)
type StatisticsRulesets ¶
type StatisticsRulesets map[Ruleset]*UserStatistics
type SupportAgainEvent ¶
type SupportAgainEvent struct {
User EventUser `json:"user"`
}
type SupportFirstEvent ¶
type SupportFirstEvent struct {
User EventUser `json:"user"`
}
type SupportGiftEvent ¶
type SupportGiftEvent struct {
User EventUser `json:"user"`
}
type UpdateStream ¶
type User ¶
type User struct { UserCompact Country Country `json:"country"` Cover Cover `json:"cover"` Discord *string `json:"discord"` HasSupported bool `json:"has_supported"` Interests *string `json:"interests"` JoinDate time.Time `json:"join_date"` Kudosu UserKudosu `json:"kudosu"` Location string `json:"location"` MaxBlocks int `json:"max_blocks"` MaxFriends int `json:"max_friends"` Occupation *string `json:"occupation"` Playmode Ruleset `json:"playmode"` Playstyle []Playstyle `json:"playstyle"` PostCount int `json:"post_count"` ProfileOrder []ProfilePage `json:"profile_order"` Title *string `json:"title"` TitleURL *string `json:"title_url"` Twitter *string `json:"twitter"` Website *string `json:"website"` }
type UserAccountHistory ¶
type UserAchievement ¶
type UserBeatmapScore ¶
type UserBeatmapScoreRequest ¶
type UserBeatmapScoreRequest struct { Beatmap int User int Mode *Ruleset // contains filtered or unexported fields }
func (*UserBeatmapScoreRequest) Build ¶
func (r *UserBeatmapScoreRequest) Build() (*UserBeatmapScore, error)
func (*UserBeatmapScoreRequest) SetMode ¶
func (r *UserBeatmapScoreRequest) SetMode(mode Ruleset) *UserBeatmapScoreRequest
type UserBeatmapScores ¶
type UserBeatmapScores struct {
Scores []Score `json:"scores"`
}
type UserBeatmapScoresRequest ¶
type UserBeatmapScoresRequest struct { Beatmap int User int Mode *Ruleset // contains filtered or unexported fields }
func (*UserBeatmapScoresRequest) Build ¶
func (r *UserBeatmapScoresRequest) Build() (*UserBeatmapScores, error)
func (*UserBeatmapScoresRequest) SetMode ¶
func (r *UserBeatmapScoresRequest) SetMode(mode Ruleset) *UserBeatmapScoresRequest
type UserBeatmapsRequest ¶
type UserBeatmapsRequest struct { User int MapType string Limit *int Offset *int // contains filtered or unexported fields }
func (*UserBeatmapsRequest) Build ¶
func (r *UserBeatmapsRequest) Build() (*[]UserBeatmapset, error)
func (*UserBeatmapsRequest) SetLimit ¶
func (r *UserBeatmapsRequest) SetLimit(limit int) *UserBeatmapsRequest
func (*UserBeatmapsRequest) SetOffset ¶
func (r *UserBeatmapsRequest) SetOffset(offset int) *UserBeatmapsRequest
type UserBeatmapset ¶
type UserBeatmapset struct { Beatmapset Beatmaps []struct { Beatmap Checksum string `json:"checksum"` } `json:"beatmaps"` }
type UserCompact ¶
type UserCompact struct { AvatarURL string `json:"avatar_url"` CountryCode string `json:"country_code"` DefaultGroup *string `json:"default_group"` ID int `json:"id"` IsActive bool `json:"is_active"` IsBot bool `json:"is_bot"` IsDeleted bool `json:"is_deleted"` IsOnline bool `json:"is_online"` IsSupporter bool `json:"is_supporter"` LastVisit *time.Time `json:"last_visit"` PmFriendsOnly bool `json:"pm_friends_only"` ProfileColour *string `json:"profile_colour"` Username string `json:"username"` }
type UserExtended ¶
type UserExtended struct { User AccountHistory []UserAccountHistory `json:"account_history"` ActiveTournamentBanner *UserActiveTournamentBanner `json:"active_tournament_banners"` Badges []UserBadge `json:"badges"` BeatmapPlaycountsCount int `json:"beatmap_playcounts_count"` FavouriteBeatmapsetCount int `json:"favourite_beatmapset_count"` FollowerCount int `json:"follower_count"` GraveyardBeatmapsetCount int `json:"graveyard_beatmapset_count"` Groups []UserGroup `json:"groups"` LovedBeatmapsetCount int `json:"loved_beatmapset_count"` MappingFollowerCount int `json:"mapping_follower_count"` MonthlyPlaycounts []MonthlyPlaycount `json:"monthly_playcounts"` Page Page `json:"page"` PendingBeatmapsetCount int `json:"pending_beatmapset_count"` PreviousUsernames []string `json:"previous_usernames"` RankHighest *RankHighest `json:"rank_highest"` RankHistory RankHistory `json:"rank_history"` RankedBeatmapsetCount int `json:"ranked_beatmapset_count"` ReplaysWatchedCounts []MonthlyPlaycount `json:"replays_watched_counts"` ScoresBestCount int `json:"scores_best_count"` ScoresFirstCount int `json:"scores_first_count"` ScoresRecentCount int `json:"scores_recent_count"` Statistics UserStatistics `json:"statistics"` SupportLevel int `json:"support_level"` UserAchievements []UserAchievement `json:"user_achievements"` }
type UserKudosu ¶
type UserKudosuRequest ¶
type UserKudosuRequest struct { User int Limit *int Offset *int // contains filtered or unexported fields }
func (*UserKudosuRequest) Build ¶
func (r *UserKudosuRequest) Build() (*[]KudosuHistory, error)
func (*UserKudosuRequest) SetLimit ¶
func (r *UserKudosuRequest) SetLimit(limit int) *UserKudosuRequest
func (*UserKudosuRequest) SetOffset ¶
func (r *UserKudosuRequest) SetOffset(offset int) *UserKudosuRequest
type UserMostPlayedRequest ¶
type UserMostPlayedRequest struct { User int Limit *int Offset *int // contains filtered or unexported fields }
func (*UserMostPlayedRequest) Build ¶
func (r *UserMostPlayedRequest) Build() (*[]UserMostPlayedResponse, error)
func (*UserMostPlayedRequest) SetLimit ¶
func (r *UserMostPlayedRequest) SetLimit(limit int) *UserMostPlayedRequest
func (*UserMostPlayedRequest) SetOffset ¶
func (r *UserMostPlayedRequest) SetOffset(offset int) *UserMostPlayedRequest
type UserMostPlayedResponse ¶
type UserMostPlayedResponse struct { BeatmapID int `json:"beatmap_id"` Beatmap *BeatmapCompact `json:"beatmap"` Beatmapset *BeatmapsetCompact `json:"beatmapset"` Count int `json:"count"` }
type UserRecentActivityRequest ¶
type UserRecentActivityRequest struct { User int Limit *int Offset *int // contains filtered or unexported fields }
func (*UserRecentActivityRequest) Build ¶
func (r *UserRecentActivityRequest) Build() (*[]EventBase, error)
func (*UserRecentActivityRequest) SetLimit ¶
func (r *UserRecentActivityRequest) SetLimit(limit int) *UserRecentActivityRequest
func (*UserRecentActivityRequest) SetOffset ¶
func (r *UserRecentActivityRequest) SetOffset(offset int) *UserRecentActivityRequest
type UserRequest ¶
func (*UserRequest) Build ¶
func (r *UserRequest) Build() (*UserExtended, error)
func (*UserRequest) SetMode ¶
func (r *UserRequest) SetMode(mode Ruleset) *UserRequest
type UserScore ¶
type UserScore struct { Score Beatmap struct { Beatmap Checksum *string `json:"checksum"` } `json:"beatmap"` Beatmapset BeatmapsetCompact `json:"beatmapset"` User UserCompact `json:"user"` Weight *ScoreWeight `json:"weight"` }
type UserScoresRequest ¶
type UserScoresRequest struct { User int Type ScoreType IncludeFails *bool Mode *Ruleset Limit *int Offset *int // contains filtered or unexported fields }
func (*UserScoresRequest) Best ¶
func (r *UserScoresRequest) Best() *UserScoresRequest
func (*UserScoresRequest) Build ¶
func (r *UserScoresRequest) Build() (*[]UserScore, error)
func (*UserScoresRequest) Firsts ¶
func (r *UserScoresRequest) Firsts() *UserScoresRequest
func (*UserScoresRequest) Pinned ¶
func (r *UserScoresRequest) Pinned() *UserScoresRequest
func (*UserScoresRequest) Recent ¶
func (r *UserScoresRequest) Recent() *UserScoresRequest
func (*UserScoresRequest) SetIncludeFails ¶
func (r *UserScoresRequest) SetIncludeFails(includeFails bool) *UserScoresRequest
func (*UserScoresRequest) SetLimit ¶
func (r *UserScoresRequest) SetLimit(limit int) *UserScoresRequest
func (*UserScoresRequest) SetOffset ¶
func (r *UserScoresRequest) SetOffset(offset int) *UserScoresRequest
type UserStatistics ¶
type UserStatistics struct { Count100 int `json:"count_100"` Count300 int `json:"count_300"` Count50 int `json:"count_50"` CountMiss int `json:"count_miss"` GradeCounts GradeCounts `json:"grade_counts"` HitAccuracy float64 `json:"hit_accuracy"` IsRanked bool `json:"is_ranked"` Level UserLevel `json:"level"` MaximumCombo int `json:"maximum_combo"` PlayCount int `json:"play_count"` PlayTime int `json:"play_time"` PP float64 `json:"pp"` GlobalRank *int `json:"global_rank"` RankedScore int `json:"ranked_score"` ReplaysWatchedByOthers int `json:"replays_watched_by_others"` TotalHits int `json:"total_hits"` TotalScore int `json:"total_score"` CountryRank *int `json:"country_rank"` }
type UsernameChangeEvent ¶
type UsernameChangeEvent struct {
User EventUser `json:"user"`
}
type UsersRequest ¶
type UsersRequest struct { Users []int // contains filtered or unexported fields }
func (*UsersRequest) Build ¶
func (r *UsersRequest) Build() (*GetUsersResponse, error)
type WikiPageRequest ¶
func (*WikiPageRequest) Build ¶
func (r *WikiPageRequest) Build() (*WikiPage, error)