Documentation ¶
Index ¶
- func RefreshAuth() bool
- type AccessToken
- type Request
- func (req *Request) AddHeader(key string, value string)
- func (req *Request) AddParams(key, value string) *Request
- func (req *Request) EncodeParams(datas ...map[string]string) string
- func (req *Request) GetParams(key string) string
- func (req *Request) Headers()
- func (req *Request) NewRequest(Head ...map[string]string) *Response
- func (req *Request) QueryData() io.ReadCloser
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RefreshAuth ¶
func RefreshAuth() bool
Types ¶
type AccessToken ¶
type AccessToken struct { Error pixivstruct.Error `json:"error"` AccessToken string `json:"access_token"` ExpiresIn int `json:"expires_in"` TokenType string `json:"token_type"` Scope string `json:"scope"` RefreshToken string `json:"refresh_token"` User struct { ProfileImageUrls struct { Px16X16 string `json:"px_16x16"` Px50X50 string `json:"px_50x50"` Px170X170 string `json:"px_170x170"` } `json:"profile_image_urls"` ID string `json:"id"` Name string `json:"name"` Account string `json:"account"` MailAddress string `json:"mail_address"` IsPremium bool `json:"is_premium"` XRestrict int `json:"x_restrict"` IsMailAuthorized bool `json:"is_mail_authorized"` RequirePolicyAgreement bool `json:"require_policy_agreement"` } `json:"user"` Response struct { AccessToken string `json:"access_token"` ExpiresIn int `json:"expires_in"` TokenType string `json:"token_type"` Scope string `json:"scope"` RefreshToken string `json:"refresh_token"` User struct { ProfileImageUrls struct { Px16X16 string `json:"px_16x16"` Px50X50 string `json:"px_50x50"` Px170X170 string `json:"px_170x170"` } `json:"profile_image_urls"` ID string `json:"id"` Name string `json:"name"` Account string `json:"account"` MailAddress string `json:"mail_address"` IsPremium bool `json:"is_premium"` XRestrict int `json:"x_restrict"` IsMailAuthorized bool `json:"is_mail_authorized"` RequirePolicyAgreement bool `json:"require_policy_agreement"` } `json:"user"` } `json:"response"` }
func ChromeDriverLogin ¶
func ChromeDriverLogin() (*AccessToken, error)
type Request ¶
type Request struct { Path string // API Path Mode string // GET, POST, PUT Header map[string]string // Request Header Query map[string]string // Query Params Params url.Values // init in url.Values // contains filtered or unexported fields }
func (*Request) QueryData ¶
func (req *Request) QueryData() io.ReadCloser
type Response ¶
type Response struct { Response *http.Response // Response from http.DefaultClient.Do Request *Request // Request from type Request Body io.ReadCloser // Body from Response // contains filtered or unexported fields }
func (*Response) GetBody ¶
func (resp *Response) GetBody() io.ReadCloser
func (*Response) GetCookies ¶
Click to show internal directories.
Click to hide internal directories.