Skip to content
This repository has been archived by the owner on Jul 7, 2022. It is now read-only.

sms help #114

Open
philwep opened this issue Feb 21, 2017 · 1 comment
Open

sms help #114

philwep opened this issue Feb 21, 2017 · 1 comment

Comments

@philwep
Copy link

philwep commented Feb 21, 2017

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?

@Ilhicas
Copy link

Ilhicas commented Sep 11, 2017

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
Development

No branches or pull requests

3 participants