core

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: May 23, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package core 包含SDKClient

Index

Constants

View Source
const (
	// BASE_URL 默认APIgateway
	BASE_URL = "https://ad.oceanengine.com/open_api/"
	// ANALYTICS_URL 转化回传API gateway
	ANALYTICS_URL = "https://analytics.oceanengine.com/api/v2/"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type SDKClient

type SDKClient struct {
	AppID  string
	Secret string
	// contains filtered or unexported fields
}

SDKClient sdk client

func NewSDKClient

func NewSDKClient(appID string, secret string) *SDKClient

NewSDKClient 创建SDKClient

func (*SDKClient) AnalyticsPost

func (c *SDKClient) AnalyticsPost(gw string, req model.PostRequest, resp model.Response) error

AnalyticsPost 转化回传API专用

func (*SDKClient) DisableSandbox

func (c *SDKClient) DisableSandbox()

DisableSandbox 禁用sandbox

func (*SDKClient) Get

func (c *SDKClient) Get(gw string, req model.GetRequest, resp model.Response, accessToken string) error

Get get api

func (*SDKClient) GetBytes

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

GetBytes get bytes api

func (*SDKClient) Post

func (c *SDKClient) Post(gw string, req model.PostRequest, resp model.Response, accessToken string) error

Post post api

func (*SDKClient) SetDebug

func (c *SDKClient) SetDebug(debug bool)

SetDebug 设置debug模式

func (*SDKClient) Upload

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

Upload multipart/form-data post

func (*SDKClient) UseSandbox

func (c *SDKClient) UseSandbox()

UseSandbox 启用sandbox

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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