Back to godoc.org
gitee.com/cuckoopark/ys7

Package ys

v0.0.0-...-256c027
Latest Go to latest

The highest tagged major version is .

Published: Dec 10, 2019 | License: MIT | Module: gitee.com/cuckoopark/ys7

Index

type Client

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

func NewClient

func NewClient(appKey string, secret string) (client *Client)

初始化萤石云客户端

func (*Client) GetAccessToken

func (c *Client) GetAccessToken() (ysRsp GetAccessTokenResponse, err error)

获取AccessToken https://open.ys7.com/doc/zh/book/index/user.html

type GetAccessTokenResponse

type GetAccessTokenResponse struct {
	ResponseModel
	Data GetAccessTokenResponseModel `json:"data"` // 数据
}

获取AccessToken的返回值

type GetAccessTokenResponseModel

type GetAccessTokenResponseModel struct {
	AccessToken string `json:"accessToken"` // 获取的accessToken
	ExpireTime  int64  `json:"expireTime"`  // 具体过期时间,精确到毫秒
}

type ResponseModel

type ResponseModel struct {
	Code string `json:"code"` // 返回码
	Msg  string `json:"msg"`  // 错误消息
}

返回结果基本模型

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier