kstep / pushybullet

Python bindings for Pushbullet (http://pushbullet.com/) API v2 with freedom of usage in mind
33 stars 4 forks source link

Stream for particular device? #12

Closed stephenjamieson closed 9 years ago

stephenjamieson commented 9 years ago

Is there a way to only get items from the stream that are for particular devices?

kstep commented 9 years ago

Just use api.pushes() method and filter by device iden:

device_iden = "abcdefg"
pushes = (p for p in api.pushes() if p.source_device_iden == device_iden)
stephenjamieson commented 9 years ago

That's what I thought, wasn't sure if there was something in the API to allow for a single devices pushes besides filtering. Thanks!