core

package
v0.0.0-...-4c075ac Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: MIT, Apache-2.0 Imports: 10 Imported by: 0

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

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

GetBytes get bytes api

func (*SDKClient) GetOnBody

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

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

func (*SDKClient) Upload

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

Upload multipart/form-data post

func (*SDKClient) UploadUrl

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