コード例 #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.")
}