pushbullet.py icon indicating copy to clipboard operation
pushbullet.py copied to clipboard

sms help

Open philwep opened this issue 8 years ago • 1 comments

sending sms works flawlessly, is there anyway to check for an sms meeting x requirements within a certain timeframe, say past 5 minutes. Or make it continuously check on each sms recieved?

philwep avatar Feb 21 '17 14:02 philwep

I know this is an old question, leaving here for future readers.

I believe this requires this lib to be refactored, been checking on how to read SMS. Pushbullet allows this, but seems that its not documented, as besides ephemerals, there are other endpoints, such as permanents.

To get all sms from a given device you could do something like this with current lib:

pb = Pushbullet(api_key) some_device = pb.devices[x] device_sms_url = "https://api.pushbullet.com/v2/permanents/%s_threads"%(some_device.device_iden) messages = pb._session.get(device_sms_url).text

Json load messages or use .json() from requests to work the json response of all sms for given device.

Ilhicas avatar Sep 11 '17 17:09 Ilhicas