Class: Pushbullet_CLI::Device
- Inherits:
-
Thor
- Object
- Thor
- Pushbullet_CLI::Device
- Defined in:
- lib/pb/cli/device.rb
Instance Method Summary collapse
Instance Method Details
#list ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/pb/cli/device.rb', line 11 def list url = "https://api.pushbullet.com/v2/devices?active=true" token = Utils::get_token( ) result = Utils::send( url, token, "get" ) row = result['devices'].map.with_index{ | device | [ device['iden'], device['nickname'], device['model'], ] } Utils:: print_table( [ "Iden", "Nickname", "Model" ], row ) end |