sfclient

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Query

type Query map[string]any

func Q

func Q() Query

func (Query) Add

func (q Query) Add(key string, value any)

func (Query) AddMap

func (q Query) AddMap(m map[string]any)

func (Query) Del

func (q Query) Del(key string)

func (Query) Encode

func (q Query) Encode() string

func (Query) Get

func (q Query) Get(key string) any

func (Query) SetBookInfoQuery

func (q Query) SetBookInfoQuery() Query

func (Query) SetPageQuery

func (q Query) SetPageQuery(page any) Query

func (Query) ToStringMap

func (q Query) ToStringMap() map[string]string

type SFRequest

type SFRequest struct {
	Settings *sfsettings.Settings
	// contains filtered or unexported fields
}

func NewReqClient

func NewReqClient() *SFRequest

func (*SFRequest) DownloadCover

func (s *SFRequest) DownloadCover(coverUrl string) ([]byte, error)

func (*SFRequest) Get

func (s *SFRequest) Get(endURL string, params Query) (gjson.Result, error)

func (*SFRequest) GetWeb

func (s *SFRequest) GetWeb(endURL string, params Query) (gjson.Result, error)

func (*SFRequest) LogDebug added in v0.0.6

func (s *SFRequest) LogDebug()

func (*SFRequest) Post

func (s *SFRequest) Post(endURL string, params Query) (*builder.Response, error)

func (*SFRequest) PostWeb

func (s *SFRequest) PostWeb(endURL string, params Query) (gjson.Result, error)

func (*SFRequest) SetAuth

func (s *SFRequest) SetAuth(username string, password string)

func (*SFRequest) SetProxy

func (s *SFRequest) SetProxy(proxy string)

func (*SFRequest) SetRetryCount

func (s *SFRequest) SetRetryCount(retryCount int)

Jump to

Keyboard shortcuts

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