Skip to content

Luoxin/go-pushdeer-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-pushdeer-sdk

pushdeer 的golanga版本的sdk

GitHub forks GitHub Repo stars GitHub GitHub go.mod Go version

使用方式

在模块中安装

go get github.com/Luoxin/go-pushdeer-sdk

注册设备

package main

import (
	"github.com/Luoxin/go-pushdeer-sdk/psdk"
	log "github.com/sirupsen/logrus"
)

func main() {
	p, err := psdk.New("http://127.0.0.1:8800", "token")
	if err != nil {
		log.Errorf("err:%v", err)
		return
	}

	resp, err := p.DeviceList(&psdk.DeviceListReq{})
	if err != nil {
		log.Errorf("err:%v", err)
		return
	}

	for _, device := range resp.Content.Devices {
		log.Infof("%+v", device)
	}
}

TODO

  • 完善测试
  • 完善自动化检测
  • /message/push 接口中的result的处理

About

pushdeer的golanga版本的sdk

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages