Class: FidorApi::Connectivity::Endpoint::Context
- Inherits:
-
Object
- Object
- FidorApi::Connectivity::Endpoint::Context
- Defined in:
- lib/fidor_api/connectivity/endpoint.rb
Instance Method Summary collapse
- #delete(target: :resource, action: nil, tokenless: nil) ⇒ Object
- #get(target: :resource, action: nil, query_params: nil, tokenless: nil) ⇒ Object
-
#initialize(endpoint, object) ⇒ Context
constructor
A new instance of Context.
- #post(target: :collection, action: nil, payload: nil, tokenless: nil) ⇒ Object
- #put(target: :resource, action: nil, payload: nil, tokenless: nil) ⇒ Object
Constructor Details
#initialize(endpoint, object) ⇒ Context
Returns a new instance of Context.
23 24 25 26 |
# File 'lib/fidor_api/connectivity/endpoint.rb', line 23 def initialize(endpoint, object) @endpoint = endpoint @object = object end |
Instance Method Details
#delete(target: :resource, action: nil, tokenless: nil) ⇒ Object
40 41 42 |
# File 'lib/fidor_api/connectivity/endpoint.rb', line 40 def delete(target: :resource, action: nil, tokenless: nil) request :delete, target, action, tokenless: tokenless end |
#get(target: :resource, action: nil, query_params: nil, tokenless: nil) ⇒ Object
28 29 30 |
# File 'lib/fidor_api/connectivity/endpoint.rb', line 28 def get(target: :resource, action: nil, query_params: nil, tokenless: nil) request :get, target, action, query_params: query_params, tokenless: tokenless end |
#post(target: :collection, action: nil, payload: nil, tokenless: nil) ⇒ Object
32 33 34 |
# File 'lib/fidor_api/connectivity/endpoint.rb', line 32 def post(target: :collection, action: nil, payload: nil, tokenless: nil) request :post, target, action, body: payload, tokenless: tokenless end |
#put(target: :resource, action: nil, payload: nil, tokenless: nil) ⇒ Object
36 37 38 |
# File 'lib/fidor_api/connectivity/endpoint.rb', line 36 def put(target: :resource, action: nil, payload: nil, tokenless: nil) request :put, target, action, body: payload, tokenless: tokenless end |