yigaosu

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2023 License: MIT Imports: 8 Imported by: 1 module, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

yigaosu

client := Client{
	Token: "ey...",
}
ctx := context.Background()
cards, err := client.GetETCCards(ctx)
bills, err := client.GetETCCardBillsPage(ctx, cards[0], 1, 1)

You can use Mitmproxy to obtain the JWT token when visiting the Yigaosu (e高速) WeChat mini-program.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Token string // JWT
}

func (Client) GetETCCardBillsPage

func (c Client) GetETCCardBillsPage(ctx context.Context, card ETCCard, limit, page int) ([]ETCCardBill, error)

Get bills of ETC card. Limit should be a number from 1 to 200.

func (Client) GetETCCards

func (c Client) GetETCCards(ctx context.Context) ([]ETCCard, error)

Get list of ETC cards of current user.

type ETCCard

type ETCCard struct {
	CardCode         string `json:"cardCode"`         // 1
	CardNo           string `json:"cardNo"`           // XXXXXXXXXXXXXXXXXXXX
	CardNoFormat     string `json:"cardNoFormat"`     // XXXX********XXXXXXXX
	CardType         string `json:"cardType"`         // 记账卡
	ETCCardStatus    string `json:"etcCardStatus"`    // 1
	ETCCardStatusMsg string `json:"etcCardStatusMsg"` // 正常使用
	PlateNo          string `json:"plateNo"`          // 粤XX
	ValidTime        int64  `json:"validTime"`        // 1973692800000
}

type ETCCardBill

type ETCCardBill struct {
	Amount           string `json:"amount"`           // 19.0
	Bank             string `json:"bank"`             // XX银行(XX)
	BillId           string `json:"billid"`           // T20230901XXXXXXXXXXXXXXXXXXXX
	BillName         string `json:"billName"`         // ETC通行费
	BillTitle        string `json:"billTitle"`        // XX站驶入-XX站驶出
	BillType         string `json:"billType"`         // etc
	CardType         string `json:"cardType"`         // 记账卡
	EndStation       string `json:"endStation"`       // XX站驶出
	EndTime          int64  `json:"endTime"`          // 1693480225000
	PayTime          int64  `json:"payTime"`          // 1693480225000
	PlateNo          string `json:"plateNo"`          // 粤XX
	RefundFailReason string `json:"refundFailReason"` // 已受理,支付中
	RefundState      int    `json:"refundState"`      // 3
	StartStation     string `json:"startStation"`     // XX站驶入
	StartTime        int64  `json:"startTime"`        // 1693479229000
	TotalAmount      string `json:"totalAmount"`      // 19
	WasteId          string `json:"wasteId"`          // G00944400XXXXXXXXXXXXXXXXXXXXXXXXXXXX
	WasteType        int    `json:"wasteType"`        // 1
}

Directories

Path Synopsis
yigaosusync module

Jump to

Keyboard shortcuts

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