apis

package
v1.0.3-0...-554643c Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllCategory

func AllCategory()

AllCategory requestURL: https://cloud-erp.meituan.com/bossapi/api/dish/v2/spu/getAll?date=20220121&deviceId=1164252 &operatorId=48888690&poiId=163181252&s=pos_boss&tenantId=6519763 &v=3.20.600%3A3200600&token=1642756464&sign=JR1w%2F7NPzT9cVtsc5P9SMQzLL%2Bc%3D

func Milliseconds

func Milliseconds() int64

func NowMillis

func NowMillis() int64

func Sign

func Sign(reqTime int64, queries ...string) string

Types

type Category

type Category struct {
	Combos         []interface{} `json:"combos"`
	DishAttrCnt    int           `json:"dishAttrCnt"`
	DishAttrs      []interface{} `json:"dishAttrs"`
	DishSkuDetails []interface{} `json:"dishSkuDetails"`
	DishSpecCnt    int           `json:"dishSpecCnt"`
	DishSpecs      []interface{} `json:"dishSpecs"`
	DishSpus       []struct {
		CanWeigh       bool          `json:"canWeigh"`
		CateID         int           `json:"cateId"`
		CateName       string        `json:"cateName"`
		Desc           string        `json:"desc"`
		DishAttrSource int           `json:"dishAttrSource"`
		DishAttrs      []interface{} `json:"dishAttrs"`
		DishSkus       []struct {
			ID            int    `json:"id"`
			MemberPrice   int    `json:"memberPrice"`
			No            string `json:"no"`
			Price         int    `json:"price"`
			SaledOnWaiMai bool   `json:"saledOnWaiMai"`
			Spec          string `json:"spec"`
		} `json:"dishSkus"`
		ID             int           `json:"id"`
		ImgURL         string        `json:"imgUrl"`
		MinCount       int           `json:"minCount"`
		ModifyTime     int64         `json:"modifyTime"`
		Name           string        `json:"name"`
		No             string        `json:"no"`
		SaledOnWaiMai  bool          `json:"saledOnWaiMai"`
		ShowLimit      bool          `json:"showLimit"`
		SideDishSource int           `json:"sideDishSource"`
		SideDishes     []interface{} `json:"sideDishes"`
		Status         int           `json:"status"`
		Type           int           `json:"type"`
		Unit           string        `json:"unit"`
		WaiMaiStatus   int           `json:"waiMaiStatus"`
	} `json:"dishSpus"`
	ID          int           `json:"id"`
	ModifyTime  int64         `json:"modifyTime"`
	Name        string        `json:"name"`
	SideDishCnt int           `json:"sideDishCnt"`
	SideDishes  []interface{} `json:"sideDishes"`
	Type        int           `json:"type"`
}

type CategoryResp

type CategoryResp struct {
	Code int        `json:"code"`
	Data []Category `json:"data"`
}

CategoryResp

{
	"code": 200,
	"data": [
		{
			"combos": [],
			"dishAttrCnt": 0,
			"dishAttrs": [],
			"dishSkuDetails": [],
			"dishSpecCnt": 0,
			"dishSpecs": [],
			"dishSpus": [
				{
					"canWeigh": false,
					"cateId": 2361755,
					"cateName": "小吃",
					"desc": "",
					"dishAttrSource": 1,
					"dishAttrs": [],
					"dishSkus": [
						{
							"id": 23841812,
							"memberPrice": 1000,
							"no": "",
							"price": 1000,
							"saledOnWaiMai": false,
							"spec": "份"
						}
					],
					"id": 29332034,
					"imgUrl": "http://p1.meituan.net/xianfu/15b2969962e9a5f2b9c66fa4578e70f486016.jpg",
					"minCount": 0,
					"modifyTime": 1589081652000,
					"name": "凉皮",
					"no": "",
					"saledOnWaiMai": false,
					"showLimit": false,
					"sideDishSource": 2,
					"sideDishes": [],
					"status": 1,
					"type": 1,
					"unit": "份",
					"waiMaiStatus": 2
				}
			],
			"id": 2361755,
			"modifyTime": 1632227987000,
			"name": "小吃",
			"sideDishCnt": 0,
			"sideDishes": [],
			"type": 1
		}
	]
}

type LoginResp

type LoginResp struct {
	Data struct {
		Bizacctid        int    `json:"bizacctid"`
		Login            string `json:"login"`
		PartType         int    `json:"part_type"`
		PartKey          string `json:"part_key"`
		LoginSensitive   int    `json:"loginSensitive"`
		NameSensitive    int    `json:"nameSensitive"`
		ContactSensitive int    `json:"contactSensitive"`
		AccessToken      string `json:"access_token"`
		RefreshToken     string `json:"refresh_token"`
		ExpireIn         int    `json:"expire_in"`
		RefreshIn        int    `json:"refresh_in"`
	} `json:"data"`
}

func LoginV5

func LoginV5(username, password, partKey string, remember bool) (resp LoginResp, err error)

Jump to

Keyboard shortcuts

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