Class: Pushbullet::Client

Inherits:
Object
  • Object
show all
Includes:
Chats, Constants, Devices, Permanents, Pushes, Subscriptions, Texts, Users
Defined in:
lib/pushbullet/client.rb

Constant Summary

Constants included from Constants

Pushbullet::Constants::API_V2_BASE_PATH

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Users

#me

Methods included from Texts

#texts

Methods included from Subscriptions

#subscriptions

Methods included from Pushes

#pushes, #self_pushes

Methods included from Permanents

#permanent_conversation, #permanents

Methods included from Devices

#devices

Methods included from Chats

#chats

Constructor Details

#initialize(access_token:, base_path: API_V2_BASE_PATH, port: 80, limit: 500) ⇒ Client

Returns a new instance of Client.



26
27
28
29
30
31
# File 'lib/pushbullet/client.rb', line 26

def initialize(access_token:, base_path: API_V2_BASE_PATH, port: 80, limit: 500)
  @access_token = access_token
  @base_path = base_path
  @port = port
  @limit = limit
end

Instance Attribute Details

#base_pathObject (readonly)

TODO: Add uploads TODO: Add ephemerals TODO: Websockets TODO: Universal copy/paste TODO: Encryption TODO: Pagination TODO: Limits TODO: Date parsing TODO: Create api client creation library



24
25
26
# File 'lib/pushbullet/client.rb', line 24

def base_path
  @base_path
end

#keyObject (readonly)

TODO: Add uploads TODO: Add ephemerals TODO: Websockets TODO: Universal copy/paste TODO: Encryption TODO: Pagination TODO: Limits TODO: Date parsing TODO: Create api client creation library



24
25
26
# File 'lib/pushbullet/client.rb', line 24

def key
  @key
end

#portObject (readonly)

TODO: Add uploads TODO: Add ephemerals TODO: Websockets TODO: Universal copy/paste TODO: Encryption TODO: Pagination TODO: Limits TODO: Date parsing TODO: Create api client creation library



24
25
26
# File 'lib/pushbullet/client.rb', line 24

def port
  @port
end

#secretObject (readonly)

TODO: Add uploads TODO: Add ephemerals TODO: Websockets TODO: Universal copy/paste TODO: Encryption TODO: Pagination TODO: Limits TODO: Date parsing TODO: Create api client creation library



24
25
26
# File 'lib/pushbullet/client.rb', line 24

def secret
  @secret
end

Class Method Details

.api_versionObject

This is the version of the API docs this client was built off-of



38
39
40
# File 'lib/pushbullet/client.rb', line 38

def self.api_version
  'v2 2020-10-17'
end

.compatible_api_versionObject



33
34
35
# File 'lib/pushbullet/client.rb', line 33

def self.compatible_api_version
  'v2'
end