welove

package
v0.0.0-...-99e8b72 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2021 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const KEY = "8b5b6eca8a9d1d1f"

Variables

This section is empty.

Functions

func FarmSign

func FarmSign(love Love) (*http.Response, error)

func GetLoveSpaceId

func GetLoveSpaceId(body string) string

func GetLoveSpaceIdRaw

func GetLoveSpaceIdRaw(accessToken, appKey string) (*http.Response, error)

我们的家

func HomePost

func HomePost(accessToken string, taskType int, loveSpaceId string) (*http.Response, error)

func QueryTreeInfo

func QueryTreeInfo(accessToken, appKey string) ([]byte, error)

func RandomHouse

func RandomHouse(accessToken string) (string, bool)

func ServerRun

func ServerRun(path, port string, server bool)

func TreePost

func TreePost(accessToken, appKey string, op int) (*http.Response, error)

func Visit

func Visit(accessToken, loveSpaceId string) (*http.Response, error)

Types

type BuyItemStatus

type BuyItemStatus struct {
	Result   int `json:"result"`
	Messages []struct {
		StallItem struct {
			BuyerHeadURL  string `json:"buyer_head_url"`
			BuyerFarmName string `json:"buyer_farm_name"`
			ID            int    `json:"id"`
		} `json:"stall_item,omitempty"`
		OpTime     int64 `json:"op_time"`
		MsgType    int   `json:"msg_type"`
		Warehouses []struct {
			Category int `json:"category"`
			ItemsInc []struct {
				ItemID int `json:"item_id"`
				Count  int `json:"count"`
			} `json:"items_inc"`
		} `json:"warehouses,omitempty"`
		FarmID   string `json:"farm_id,omitempty"`
		GoldCost int    `json:"gold_cost,omitempty"`
	} `json:"messages"`
}

func BuyItem

func BuyItem(accessToken, sellerFarmId string, stallSaleId int) BuyItemStatus

type Data

type Data struct {
	// contains filtered or unexported fields
}

type Love

type Love struct {
	AccessToken              string `json:"access_token"`
	AppKey                   string `json:"app_key"`
	Mobile                   string `json:"mobile"`
	LoverMobile              string `json:"lover_mobile"`
	DayuAppKey               string `json:"dayu_app_key"`
	DayuAppSecret            string `json:"dayu_app_secret"`
	DayuSunlightTemplateCode string `json:"dayu_sunlight_template_code"`
	DayuWaterTemplateCode    string `json:"dayu_water_template_code"`
	DayuHomeTemplateCode     string `json:"dayu_home_template_code"`
}

配置文件

type PetStatus

type PetStatus struct {
	Result   int `json:"result"`
	Messages []struct {
		MsgType int `json:"msg_type"`
		Pets    []struct {
			PetID    int `json:"pet_id"`
			PetTasks []struct {
				Count      int `json:"count"`
				TaskType   int `json:"task_type"`
				RemainTime int `json:"remain_time"`
			} `json:"pet_tasks"`
		} `json:"pets,omitempty"`
		Count int `json:"count,omitempty"`
	} `json:"messages"`
}

func GetPetStatus

func GetPetStatus(accessToken string) PetStatus

type PetTaskResult

type PetTaskResult struct {
	Messages []struct {
		Count      int `json:"count"`
		MsgType    int `json:"msg_type"`
		PetID      int `json:"pet_id"`
		RemainTime int `json:"remain_time"`
		TaskType   int `json:"task_type"`
	} `json:"messages"`
	Result   int    `json:"result"`
	ErrorMsg string `json:"error_msg"`
}

func DoPetTask

func DoPetTask(accessToken, petId, taskType string) PetTaskResult

type QueryItem

type QueryItem struct {
	Result   int `json:"result"`
	Messages []struct {
		OpTime  int64 `json:"op_time"`
		MsgType int   `json:"msg_type"`
		AdItems []struct {
			ItemID        int    `json:"item_id"`
			Count         int    `json:"count"`
			OpTime        int64  `json:"op_time"`
			NeedHelp      int    `json:"need_help"`
			SellerFarmID  string `json:"seller_farm_id"`
			HeadURLFamale string `json:"head_url_famale"`
			HeadURLMale   string `json:"head_url_male"`
			ID            int    `json:"id"`
			FarmName      string `json:"farm_name"`
			Coin          int    `json:"coin"`
		} `json:"ad_items"`
	} `json:"messages"`
}

func QueryItems

func QueryItems(accessToken string) QueryItem

type Sig

type Sig struct {
	// contains filtered or unexported fields
}

func NewSig

func NewSig(key []byte) *Sig

func (*Sig) Encode

func (l *Sig) Encode(method, u string, data ...Data) string

type WlHttpClient

type WlHttpClient struct {
	Client *http.Client
}

func NewWlHttpClient

func NewWlHttpClient() *WlHttpClient

func (*WlHttpClient) Post

func (client *WlHttpClient) Post(url string, data url.Values) (*http.Response, error)

Jump to

Keyboard shortcuts

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