Class: Pcloud::Resource
- Inherits:
-
Object
- Object
- Pcloud::Resource
- Defined in:
- lib/pcloud/resource.rb
Instance Method Summary collapse
- #file ⇒ Object
- #get(params) ⇒ Object
-
#initialize(client, path = "") ⇒ Resource
constructor
A new instance of Resource.
- #post(params, payload = {}) ⇒ Object
Constructor Details
#initialize(client, path = "") ⇒ Resource
Returns a new instance of Resource.
6 7 8 |
# File 'lib/pcloud/resource.rb', line 6 def initialize(client, path = "") @client, @path = client, path end |
Instance Method Details
#file ⇒ Object
18 19 20 |
# File 'lib/pcloud/resource.rb', line 18 def file @file ||= FileHandler.new(@client) end |
#get(params) ⇒ Object
10 11 12 |
# File 'lib/pcloud/resource.rb', line 10 def get(params) create_request(:get, params).call end |
#post(params, payload = {}) ⇒ Object
14 15 16 |
# File 'lib/pcloud/resource.rb', line 14 def post(params, payload = {}) create_request(:post, params, payload).call end |