core

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package core 包含SDKClient

Index

Constants

View Source
const (
	// GATEWAY 默认APIgateway
	GATEWAY = "https://gw-api.pinduoduo.com/api/router"
	// UPLOAD GATEWAY
	UPLOAD_GATEWAY = "https://gw-upload.pinduoduo.com/api/upload"
	// 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) SetUploadGateway added in v1.1.6

func (c *SDKClient) SetUploadGateway(gw string)

func (*SDKClient) Upload added in v1.1.6

func (c *SDKClient) Upload(req model.UploadRequest, resp model.Response, accessToken string) error

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