sdk

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

README

avata-sdk-go

快速开始

引入依赖
 go get -u github.com/bianjieai/avata-sdk-go
创建和使用客户端
import (
	"time"
	
	"github.com/sirupsen/logrus"

	sdk "github.com/bianjieai/avata-sdk-go"
	"github.com/bianjieai/avata-sdk-go/configs"
)

	// 非必填参数(不填写将使用默认值)
    log := logrus.New()
	log.SetLevel(logrus.DebugLevel)

	options := []configs.Options{
		configs.Logger(log), // 日志
		configs.HttpTimeout(15 * time.Second), // 响应超时时间,默认: 10s
	}

	client = sdk.NewClient("域名,不同环境对应不同的域名,如测试环境: https://stage.apis.avata.bianjie.ai", "项目参数 API KEY", "项目参数 API SECRET", options...)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AvataClient

func NewClient

func NewClient(domain, apiKey, apiSecret string, options ...configs.Options) *AvataClient

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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