Class: Pushbullet::Client
- Inherits:
-
Object
- Object
- Pushbullet::Client
- Includes:
- Chats, Constants, Devices, Permanents, Pushes, Subscriptions, Texts, Users
- Defined in:
- lib/pushbullet/client.rb
Constant Summary
Constants included from Constants
Pushbullet::Constants::API_BASE_PATH, Pushbullet::Constants::API_V2_BASE_PATH
Instance Attribute Summary collapse
-
#base_path ⇒ Object
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.
-
#key ⇒ Object
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.
-
#port ⇒ Object
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.
-
#secret ⇒ Object
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.
-
#timeout ⇒ Object
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.
Class Method Summary collapse
-
.api_version ⇒ Object
This is the version of the API docs this client was built off-of.
- .compatible_api_version ⇒ Object
Instance Method Summary collapse
- #check_api ⇒ Object
-
#initialize(access_token:, base_path: API_V2_BASE_PATH, port: 80, limit: 500, timeout: 1000) ⇒ Client
constructor
A new instance of Client.
Methods included from Users
Methods included from Texts
Methods included from Subscriptions
Methods included from Pushes
Methods included from Permanents
#permanent_conversation, #permanents
Methods included from Devices
Methods included from Chats
Constructor Details
#initialize(access_token:, base_path: API_V2_BASE_PATH, port: 80, limit: 500, timeout: 1000) ⇒ Client
Returns a new instance of Client.
27 28 29 30 31 32 33 34 |
# File 'lib/pushbullet/client.rb', line 27 def initialize(access_token:, base_path: API_V2_BASE_PATH, port: 80, limit: 500, timeout: 1000) @access_token = access_token @base_path = base_path @port = port @limit = limit @disable_limit = false # Used internally for permanents calls @timeout = timeout end |
Instance Attribute Details
#base_path ⇒ Object
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 |
#key ⇒ Object (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 |
#port ⇒ Object (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 |
#secret ⇒ Object (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 |
#timeout ⇒ Object (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 timeout @timeout end |
Class Method Details
.api_version ⇒ Object
This is the version of the API docs this client was built off-of
41 42 43 |
# File 'lib/pushbullet/client.rb', line 41 def self.api_version 'v2 2024-02-23' end |
.compatible_api_version ⇒ Object
36 37 38 |
# File 'lib/pushbullet/client.rb', line 36 def self.compatible_api_version 'v2' end |
Instance Method Details
#check_api ⇒ Object
45 46 47 48 49 |
# File 'lib/pushbullet/client.rb', line 45 def check_api params = process_cursor(nil, params: {}) path = '' (http_method: :get, path: path, params: params, custom_base_path: API_BASE_PATH) end |