Documentation ¶
Index ¶
- type Client
- func (c *Client) BotLogin(input *DiscordBotLoginRequest) (*DiscordBotLoginResponse, error)
- func (c *Client) Daily(id string) (*DiscordMemberResponse, error)
- func (c *Client) Leaderboard(page int) (*DiscordLeaderboardResponse, error)
- func (c *Client) Member(id string) (*DiscordMemberResponse, error)
- func (c *Client) SetToken(token string)
- func (c *Client) Verify(input *DiscordVerifyRequest) (*DiscordVerifyResponse, error)
- type DiscordBotLoginRequest
- type DiscordBotLoginResponse
- type DiscordLeaderboardResponse
- type DiscordMemberResponse
- type DiscordVerifyRequest
- type DiscordVerifyResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewFDSClient ¶
NewFDSClient creates a new client for the FDS API. For most cases, it is recommended to use the SetToken method soon after to set the token.
func (*Client) BotLogin ¶
func (c *Client) BotLogin(input *DiscordBotLoginRequest) (*DiscordBotLoginResponse, error)
BotLogin is used to login the bot to the Discord API. No token is required for this endpoint.
func (*Client) Daily ¶
func (c *Client) Daily(id string) (*DiscordMemberResponse, error)
Daily is used to claim the daily reward for a Discord user. The backend will return the user's updated stats. TODO: Add error docs
func (*Client) Leaderboard ¶ added in v0.4.0
func (c *Client) Leaderboard(page int) (*DiscordLeaderboardResponse, error)
Leaderboard is used to get the leaderboard for all verified Discord users. NOTE: The pagination uses zero-based indexing.
func (*Client) Member ¶ added in v0.4.0
func (c *Client) Member(id string) (*DiscordMemberResponse, error)
Member is used to get the stats for a specific Discord user.
func (*Client) SetToken ¶
SetToken sets the token for the client. This token for is used for most endpoints.
func (*Client) Verify ¶
func (c *Client) Verify(input *DiscordVerifyRequest) (*DiscordVerifyResponse, error)
Verify is used to link a Discord account to a Hypixel account. The backend will store a snapshot of the player's Hypixel stats and Mojang profile as well as store the Discord user.
type DiscordBotLoginRequest ¶
type DiscordBotLoginRequest struct {
Pwd string `json:"pwd" query:"pwd"`
}
type DiscordBotLoginResponse ¶
type DiscordBotLoginResponse struct {
Token string `json:"token"`
}
type DiscordLeaderboardResponse ¶ added in v0.4.0
type DiscordMemberResponse ¶
type DiscordMemberResponse struct {
model.DiscordMember
}
type DiscordVerifyRequest ¶
type DiscordVerifyResponse ¶
type DiscordVerifyResponse struct {
Actual string `json:"actual"`
}