Class: Unshuffle::Client
- Inherits:
-
RocketPants::Client
- Object
- RocketPants::Client
- Unshuffle::Client
- Defined in:
- lib/unshuffle/client.rb
Defined Under Namespace
Classes: Task
Instance Method Summary collapse
- #base_request_options ⇒ Object
-
#initialize(token) ⇒ Client
constructor
A new instance of Client.
- #tasks ⇒ Object
Constructor Details
#initialize(token) ⇒ Client
Returns a new instance of Client.
8 9 10 |
# File 'lib/unshuffle/client.rb', line 8 def initialize(token) @token = token end |
Instance Method Details
#base_request_options ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/unshuffle/client.rb', line 22 def { headers: { 'Authorization' => ActionController::HttpAuthentication::Token.encode_credentials(token) } } end |
#tasks ⇒ Object
18 19 20 |
# File 'lib/unshuffle/client.rb', line 18 def tasks get('tasks', as: Task) end |