Documentation ¶
Index ¶
- Variables
- type HabboAPI
- func (c *HabboAPI) GetHabbo(ctx context.Context, hotel string, habboID string) (*habbo.Habbo, error)
- func (c *HabboAPI) GetHabboByName(ctx context.Context, hotel string, habboName string) (*habbo.Habbo, error)
- func (c *HabboAPI) GetProfile(ctx context.Context, hotel string, habboID string) (*habbo.Profile, error)
- type HabboParser
- type Parser
- type ParserMock
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type HabboAPI ¶
type HabboAPI struct {
// contains filtered or unexported fields
}
HabboAPI is a Habbo API client.
func NewHabboAPI ¶
func NewHabboAPI(parser HabboParser) *HabboAPI
NewHabboAPI creates a new Habbo API client.
func (*HabboAPI) GetHabbo ¶
func (c *HabboAPI) GetHabbo(ctx context.Context, hotel string, habboID string) (*habbo.Habbo, error)
GetHabbo fetches a Habbo by ID.
type HabboParser ¶
type HabboParser interface {
// contains filtered or unexported methods
}
HabboParser is an interface that the Habbo API uses to fetch data.
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser is a Habbo API parser
func (*Parser) WithUserAgent ¶
WithUserAgent sets the user agent for the parser
type ParserMock ¶
type ParserMock struct { HabboResponse *habbo.Habbo HabboError error ProfileResponse *habbo.Profile ProfileError error }
func NewParserMock ¶
func NewParserMock() *ParserMock
Click to show internal directories.
Click to hide internal directories.