Module: ScormEngine::Faraday::Request
- Included in:
- Client
- Defined in:
- lib/scorm_engine/faraday/request.rb
Instance Method Summary collapse
- #api_v2(without_tenant: false) ⇒ Object
- #delete(path, options = {}) ⇒ Object
- #get(path, options = {}) ⇒ Object
- #post(path, options = {}, body = nil) ⇒ Object
- #put(path, options = {}, body = nil) ⇒ Object
Instance Method Details
#api_v2(without_tenant: false) ⇒ Object
20 21 22 23 24 25 26 27 |
# File 'lib/scorm_engine/faraday/request.rb', line 20 def api_v2(without_tenant: false) @api_version = 2 @without_tenant = without_tenant yield ensure @api_version = 1 end |
#delete(path, options = {}) ⇒ Object
16 17 18 |
# File 'lib/scorm_engine/faraday/request.rb', line 16 def delete(path, = {}) request(:delete, path, ) end |
#get(path, options = {}) ⇒ Object
4 5 6 |
# File 'lib/scorm_engine/faraday/request.rb', line 4 def get(path, = {}) request(:get, path, ) end |
#post(path, options = {}, body = nil) ⇒ Object
8 9 10 |
# File 'lib/scorm_engine/faraday/request.rb', line 8 def post(path, = {}, body = nil) request(:post, path, , body) end |
#put(path, options = {}, body = nil) ⇒ Object
12 13 14 |
# File 'lib/scorm_engine/faraday/request.rb', line 12 def put(path, = {}, body = nil) request(:put, path, , body) end |