pushbullet.py
pushbullet.py copied to clipboard
sms help
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?
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.