bf1api

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2024 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Overview

Package bf1api 战地相关api库

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exception

func Exception(code int64) error

Exception 错误码转换

func GetExchange

func GetExchange() (map[string][]string, error)

GetExchange 查询该周交换

func GetPersonalID

func GetPersonalID(name string) (string, error)

GetPersonalID 由name获取玩家pid

func GetServerFullInfo added in v1.0.2

func GetServerFullInfo(gameID string) (*gjson.Result, error)

GetServerFullInfo 获取服务器完整信息

func Login

func Login(username, password string) error

Login 获取 Session token cookies

func ReturnJSON

func ReturnJSON(url, method string, body interface{}) (*gjson.Result, error)

ReturnJSON NativeAPI 返回json

Types

type Pack

type Pack struct {
	RemainTime int64
	ResetTime  int64
	Name       string
	Desc       string
	Op1Name    string
	Op2Name    string
}

Pack unmarshal json

func GetCampaignPacks

func GetCampaignPacks() (*Pack, error)

GetCampaignPacks 查询本周行动包

Jump to

Keyboard shortcuts

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