Client for Pushbullet API

Piotr Czajkowski cec22df837 Updated instructions пре 3 година
.github 5885fdfd2a Added tests пре 3 година
LICENSE.md b4317f5d84 Starting пре 3 година
README.md cec22df837 Updated instructions пре 3 година
bullet.go 2d0b1bdd4f SendFile can now send file to specific device пре 3 година
bullet_test.go 2d0b1bdd4f SendFile can now send file to specific device пре 3 година
devices.go a2cec82518 Added ListDevices пре 3 година
error.go 195375e3e4 No need for export пре 3 година
fileUpload.go 2d0b1bdd4f SendFile can now send file to specific device пре 3 година
push.go 40e0102289 SendLink can send link to specific device пре 3 година
pushInterface.go 396a5812ee Maybe a bit better пре 3 година

README.md

bullet

Go Report Card

Initialize client

b := bullet.NewBullet("YOUR_TOKEN")

Send note, use empty string in place of deviceID to send to all devices

err := b.SendNote("testTitle", "testText", "deviceID")
if err != nil {
    log.Fatal(err)
}

Send link, use empty string in place of deviceID to send to all devices

err := b.SendLink("testTitle", "testText", "https://abc.com", "deviceID")
if err != nil {
    log.Fatal(err)
}

Send file, use empty string in place of deviceID to send to all devices

err := b.SendFile("testFile", "Something", "./test.txt", "deviceID")
if err != nil {
    log.Fatal(err)
}

List devices

devices, err := b.ListDevices()
if err != nil {
    t.Error(err)
}