https://github.com/pczajkowski/bullet
Client for Pushbullet API
https://github.com/pczajkowski/bullet
pushbullet pushbullet-api
Last synced: 5 months ago
JSON representation
Client for Pushbullet API
- Host: GitHub
- URL: https://github.com/pczajkowski/bullet
- Owner: pczajkowski
- License: bsd-3-clause
- Created: 2020-09-10T14:45:36.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-01-27T14:33:45.000Z (over 5 years ago)
- Last Synced: 2024-06-20T06:33:29.106Z (almost 2 years ago)
- Topics: pushbullet, pushbullet-api
- Language: Go
- Homepage:
- Size: 34.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# bullet
[](https://goreportcard.com/report/github.com/pczajkowski/bullet)
[](https://deepsource.io/gh/pczajkowski/bullet/?ref=repository-badge)
**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)
}
**List all active pushes (modifiedAfter can be nil, limit <= 0 gives default of 500). Cursor is returned with every call (in Devices struct) and is used for pagination, so if you want to see next page of results in your next call provide cursor received from the last call.**
devices, err := b.ListPushes(true, nil, 0, "")
if err != nil {
t.Error(err)
}