core

package
v1.7.5 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 9 Imported by: 5

Documentation

Overview

Package core 核心方法

Index

Constants

View Source
const (
	// BASE_URL api gateway
	BASE_URL = "https://ad.e.kuaishou.com/rest/openapi"
	// OAUTH_URL oauth gateway
	OAUTH_URL = "https://developers.e.kuaishou.com"
	// ACTIVATE_URL 上报地址
	ACTIVATE_URL = "http://ad.partner.gifshow.com/track/activate"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type SDKClient

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

SDKClient api client

func NewSDKClient

func NewSDKClient(appID uint64, secret string) *SDKClient

NewSDKClient init sdk client

func (*SDKClient) AppID

func (c *SDKClient) AppID() uint64

AppID appID getter

func (*SDKClient) Get

func (c *SDKClient) Get(accessToken string, req model.GetRequest, resp interface{}) error

Get execute get api request

func (*SDKClient) GetBytes added in v1.3.0

func (c *SDKClient) GetBytes(accessToken string, req model.GetRequest) ([]byte, error)

GetBytes get bytes api

func (*SDKClient) GetOnBody added in v1.1.5

func (c *SDKClient) GetOnBody(accessToken string, req model.PostRequest, resp interface{}) error

func (*SDKClient) GetUrl

func (c *SDKClient) GetUrl(req model.GetRequest) string

GetUrl get请求地址

func (*SDKClient) Post

func (c *SDKClient) Post(accessToken string, req model.PostRequest, resp interface{}) error

Post execute post api request

func (*SDKClient) PostUrl

func (c *SDKClient) PostUrl(req model.PostRequest) string

PostUrl post请求地址

func (*SDKClient) Secret

func (c *SDKClient) Secret() string

Secret secret getter

func (*SDKClient) SetDebug

func (c *SDKClient) SetDebug(debug bool)

SetDebug set debug mode

func (*SDKClient) SetHttpClient added in v1.2.8

func (c *SDKClient) SetHttpClient(client *http.Client)

func (*SDKClient) Upload added in v1.0.5

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

Upload multipart/form-data post

func (*SDKClient) UploadUrl added in v1.0.5

func (c *SDKClient) UploadUrl(req model.UploadRequest) string

UploadUrl post multipart/form-data请求地址

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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