示例#1
0
文件: api.go 项目: gundalow/sp0rkle
func Confirm(s *pushes.State) error {
	if s.CanConfirm() {
		return push(s, "Pushbullet PIN = "+s.Pin,
			"Tell sp0rkle 'push auth <pin>' to complete setup.")
	}
	return errors.New("Not in correct state to send confirmation push.")
}
示例#2
0
文件: api.go 项目: gundalow/sp0rkle
func AuthCodeURL(s *pushes.State) string {
	return config().AuthCodeURL(s.State())
}
示例#3
0
文件: api.go 项目: gundalow/sp0rkle
func Push(s *pushes.State, title, body string) error {
	if s.CanPush() {
		return push(s, title, body)
	}
	return errors.New("Push not enabled.")
}