示例#1
0
文件: main.go 项目: ewok/tools
func main() {

	pb := pushbullet.New("<TOKEN>")
	devs, err := pb.Devices()
	if err != nil {
		panic(err)
	}

	for n := range devs {
		if devs[n].Nickname != "" {
			err = pb.PushNote(devs[n].Iden, "PacktFreeBook", packfreebook.PackFreeBook())
			if err != nil {
				panic(err)
			}
		}
	}
}
示例#2
0
文件: main.go 项目: ewok/tools
func getPacktFreeBook(bot tgbot.TgBot, msg tgbot.Message, text string) *string {
	r := fmt.Sprintf("Today book: %s", packfreebook.PackFreeBook())
	showMenu(bot, msg, r)
	return nil
}