login

package
v0.0.0-...-6879f62 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*requester.HTTPClient
}

Client login client

func NewLoginClient

func NewLoginClient() *Client

NewLoginClient new login client

func (*Client) InitLoginPage

func (c *Client) InitLoginPage()

InitLoginPage init

func (*Client) Login

func (c *Client) Login(phone, password string) *Result

Login by phone and dpassword

type Result

type Result struct {
	Code int `json:"code"`
	Data struct {
		UID          int    `json:"uid"`
		Name         string `json:"nickname"`
		Avatar       string `json:"avatar"`
		GCID         string `json:"gcid"`
		GCESS        string `json:"gcess"`
		ServerID     string `json:"serverId"`
		Ticket       string `json:"ticket"`
		CookieString string `json:"cookieString"`
	} `json:"data"`
	Error struct {
		Code int    `json:"code"`
		Msg  string `json:"msg"`
	} `json:"error"`
	Extra struct {
		Cost      float64 `json:"cost"`
		RequestID string  `json:"request-id"`
	} `json:"extra"`
}

Result 从百度服务器解析的数据结构

func (*Result) IsLoginSuccess

func (r *Result) IsLoginSuccess() bool

IsLoginSuccess 是否登陆成功

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL