Beispiel #1
0
func LogoutUrl(c *model.Client, callback string) (Url, error) {
	params := make(map[string]interface{})
	params["callback"] = callback
	var logoutUrl Url
	err := c.Call(RPC_COMMON, METHOD_LOGOUT_URL, params, &logoutUrl)
	return logoutUrl, err
}
Beispiel #2
0
func CheckToken(c *model.Client, token string) (Uid, error) {
	params := make(map[string]interface{})
	params["token"] = token
	var uid Uid
	err := c.Call(RPC_COMMON, METHOD_CHECK_TOKEN, params, &uid)
	return uid, err
}
Beispiel #3
0
func GetUserById(c *model.Client, uid Uid) (User, error) {
	params := make(map[string]interface{})
	params["id"] = uid
	var user User
	err := c.Call(RPC_USER, METHOD_GET_USER_BY_ID, params, &user)
	return user, err
}