core

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package core 包含SDKClient

Index

Constants

View Source
const (
	// GATEWAY 默认APIgateway
	GATEWAY = "https://gw-api.pinduoduo.com/api/router"
	// WSSEndPoint wws endpoint
	WSSEndPoint = "wss://message-api.pinduoduo.com/message"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type SDKClient

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

SDKClient sdk client

func NewSDKClient

func NewSDKClient(clientID string, secret string) *SDKClient

NewSDKClient 创建SDKClient

func (*SDKClient) ClientID

func (c *SDKClient) ClientID() string

ClientID returns client client_id

func (*SDKClient) Do

func (c *SDKClient) Do(req model.Request, resp model.Response, accessToken string) error

func (*SDKClient) SetDataType

func (c *SDKClient) SetDataType(t model.RequestDataType)

SetDataType 设置返回数据格式

func (*SDKClient) SetDebug

func (c *SDKClient) SetDebug(debug bool)

SetDebug 设置debug模式

func (*SDKClient) SetGateway

func (c *SDKClient) SetGateway(gw string)

SetGateway 设置gateway

func (*SDKClient) WSSUrl added in v1.0.9

func (c *SDKClient) WSSUrl() string

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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