richard-better / pushbullet.py

A python client for http://pushbullet.com
MIT License
575 stars 110 forks source link

Add new method to get device by nickname #61

Closed simonporter007 closed 8 years ago

simonporter007 commented 8 years ago

Currently to retrieve a specific device, the user needs to know the index of the Device in the device list. This requires either to print devices first using pb.devices or to retrieve all devices and use a loop.

As the pushbullet.py package retrieves all devices on initial connection, it is easier to provide a helper method for the end user.

simonporter007 commented 8 years ago

InvalidKeyError seemed like the best use case for when no devices are returned. Also, not submitted a new feature before, so appreciate if this isn't something you want to include.

troeggla commented 8 years ago

Very useful! Thanks!