Documentation
¶
Index ¶
- func JsonFromBytes(bytes []byte) *gojsonq.JSONQ
- func JsonFromString(s string) *gojsonq.JSONQ
- type Bl3Client
- func (client *Bl3Client) GetCodePlatforms(code string) ([]string, bool)
- func (client *Bl3Client) GetFullShiftCodeList() (ShiftCodeMap, error)
- func (client *Bl3Client) GetShiftPlatforms() (StringSet, error)
- func (client *Bl3Client) Login(username string, password string) error
- func (client *Bl3Client) RedeemShiftCode(code, platform string) error
- type Bl3Config
- type HttpClient
- func (client *HttpClient) Do(req *http.Request) (*HttpResponse, error)
- func (client *HttpClient) Get(url string) (*HttpResponse, error)
- func (client *HttpClient) Head(url string) (*HttpResponse, error)
- func (client *HttpClient) Post(url, contentType string, body io.Reader) (*HttpResponse, error)
- func (client *HttpClient) PostJson(url string, data interface{}) (*HttpResponse, error)
- func (client *HttpClient) SetDefaultHeader(k, v string)
- type HttpResponse
- type ShiftCodeMap
- type ShiftConfig
- type StringSet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JsonFromBytes ¶
func JsonFromBytes(bytes []byte) *gojsonq.JSONQ
func JsonFromString ¶
func JsonFromString(s string) *gojsonq.JSONQ
Types ¶
type Bl3Client ¶
type Bl3Client struct { HttpClient Config Bl3Config }
func NewBl3Client ¶
func (*Bl3Client) GetCodePlatforms ¶
func (*Bl3Client) GetFullShiftCodeList ¶
func (client *Bl3Client) GetFullShiftCodeList() (ShiftCodeMap, error)
func (*Bl3Client) GetShiftPlatforms ¶
func (*Bl3Client) RedeemShiftCode ¶
type Bl3Config ¶
type Bl3Config struct { Version string `json:"version"` LoginUrl string `json:"loginUrl"` LoginRedirectHeader string `json:"loginRedirectHeader"` SessionIdHeader string `json:"sessionIdHeader"` RequestHeaders map[string]string `json:"requestHeaders"` SessionHeader string `json:"sessionHeader"` Shift ShiftConfig `json:"shiftConfig"` }
type HttpClient ¶
func NewHttpClient ¶
func NewHttpClient() (*HttpClient, error)
func (*HttpClient) Do ¶
func (client *HttpClient) Do(req *http.Request) (*HttpResponse, error)
func (*HttpClient) Get ¶
func (client *HttpClient) Get(url string) (*HttpResponse, error)
func (*HttpClient) Head ¶
func (client *HttpClient) Head(url string) (*HttpResponse, error)
func (*HttpClient) Post ¶
func (client *HttpClient) Post(url, contentType string, body io.Reader) (*HttpResponse, error)
func (*HttpClient) PostJson ¶
func (client *HttpClient) PostJson(url string, data interface{}) (*HttpResponse, error)
func (*HttpClient) SetDefaultHeader ¶
func (client *HttpClient) SetDefaultHeader(k, v string)
type HttpResponse ¶
func (*HttpResponse) BodyAsHtmlDoc ¶
func (response *HttpResponse) BodyAsHtmlDoc() (*goquery.Document, error)
func (*HttpResponse) BodyAsJson ¶
func (response *HttpResponse) BodyAsJson() (*gojsonq.JSONQ, error)
type ShiftCodeMap ¶
func (ShiftCodeMap) Contains ¶
func (codeMap ShiftCodeMap) Contains(code, platform string) bool
type ShiftConfig ¶
Click to show internal directories.
Click to hide internal directories.