Documentation ¶
Index ¶
- type Client
- func (comp *Client) Authorize(data request.RequestDeviceAuthorize) (*response.ResponseDeviceAuthorize, error)
- func (comp *Client) Bind(openID string, deviceID string, ticket string) (*response.ResponseDeviceBind, error)
- func (comp *Client) ForceBind(openID string, deviceID string) (*response.ResponseDeviceBind, error)
- func (comp *Client) ForceUnbind(openID string, deviceID string) (*response.ResponseDeviceBind, error)
- func (comp *Client) Message(data *request.RequestDeviceMessage) (*response.ResponseDeviceMessage, error)
- func (comp *Client) QRCode(deviceIDs []string) (*response.ResponseDeviceCreateQRCode, error)
- func (comp *Client) Unbind(openID string, deviceID string, ticket string) (*response.ResponseDeviceBind, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
*kernel.BaseClient
}
func RegisterProvider ¶
func RegisterProvider(app kernel.ApplicationInterface) (*Client, error)
func (*Client) Authorize ¶
func (comp *Client) Authorize(data request.RequestDeviceAuthorize) (*response.ResponseDeviceAuthorize, error)
设备授权 https://iot.weixin.qq.com/wiki/new/index.html?page=3-4-5
func (*Client) Bind ¶
func (comp *Client) Bind(openID string, deviceID string, ticket string) (*response.ResponseDeviceBind, error)
设备绑定 https://iot.weixin.qq.com/wiki/new/index.html?page=3-4-7
func (*Client) ForceBind ¶
设备绑定 https://iot.weixin.qq.com/wiki/new/index.html?page=3-4-7
func (*Client) ForceUnbind ¶
func (comp *Client) ForceUnbind(openID string, deviceID string) (*response.ResponseDeviceBind, error)
设备解绑 https://iot.weixin.qq.com/wiki/new/index.html?page=3-4-7
func (*Client) Message ¶
func (comp *Client) Message(data *request.RequestDeviceMessage) (*response.ResponseDeviceMessage, error)
主动发送消息给设备 https://iot.weixin.qq.com/wiki/new/index.html?page=3-4-3
func (*Client) QRCode ¶
func (comp *Client) QRCode(deviceIDs []string) (*response.ResponseDeviceCreateQRCode, error)
获取设备二维码 https://iot.weixin.qq.com/wiki/new/index.html?page=3-4-4
func (*Client) Unbind ¶
func (comp *Client) Unbind(openID string, deviceID string, ticket string) (*response.ResponseDeviceBind, error)
设备解绑 https://iot.weixin.qq.com/wiki/new/index.html?page=3-4-7
Click to show internal directories.
Click to hide internal directories.