Documentation ¶
Index ¶
- type GFClient
- func (c *GFClient) Authenticate(user actions.User, serverLang string) (token string, accountID string, err error)
- func (c *GFClient) GetLoginCode(user actions.User, token, accountID string) (string, error)
- func (c *GFClient) GetLoginCodeHex(user actions.User, token, accountID string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GFClient ¶
type GFClient struct { }
func (*GFClient) Authenticate ¶
func (c *GFClient) Authenticate(user actions.User, serverLang string) (token string, accountID string, err error)
Authenticate proceeds to authenticate the user to the Gameforge servers. An error will be returned if the connection can't be established, the server response's status code is not 201 (session created), or the response body (JSON) can't be parsed. The user needs to be authenticated in order to request a login code.
func (*GFClient) GetLoginCode ¶
GetLoginCode returns the code (UUID) used to log in to NosTale login server. This code needs to be encoded to Base64 before it can be used in the login packet. The empty string and an error will be returned if the connection can't be established, the server response's status code is not 201 (login code generated), or the response body (JSON) can't be parsed. The user needs to be authenticated in order to request a login code. If the session has expired or the user hasn't been authenticated yet, the server will reply with a status code 503 (could not fetch session).
func (*GFClient) GetLoginCodeHex ¶
GetLoginCodeHex returns the Base64-encoded code (UUID) used to log in to NosTale login server. The empty string and an error will be returned if the connection can't be established, the server response's status code is not 201 (login code generated), or the response body (JSON) can't be parsed. The user needs to be authenticated in order to request a login code. If the session has expired or the user hasn't been authenticated yet, the server will reply with a status code 503 (could not fetch session).