Class: CONTENTdmAPI::Service
- Inherits:
-
Object
- Object
- CONTENTdmAPI::Service
- Defined in:
- lib/contentdm_api/service.rb
Overview
A class to tell the Request class which function, params and format to request of the CONTENTdm API
Instance Attribute Summary collapse
-
#format ⇒ Object
readonly
Returns the value of attribute format.
-
#function ⇒ Object
readonly
Returns the value of attribute function.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Instance Method Summary collapse
- #initialize(function: 'wsAPIDescribe', params: [], format: 'json') ⇒ Void constructor
-
#url_params ⇒ String
URL params for a given service.
Constructor Details
#initialize(function: 'wsAPIDescribe', params: [], format: 'json') ⇒ Void
15 16 17 18 19 |
# File 'lib/contentdm_api/service.rb', line 15 def initialize(function: 'wsAPIDescribe', params: [], format: 'json') @format = format @function = function @params = params end |
Instance Attribute Details
#format ⇒ Object (readonly)
Returns the value of attribute format.
5 6 7 |
# File 'lib/contentdm_api/service.rb', line 5 def format @format end |
#function ⇒ Object (readonly)
Returns the value of attribute function.
5 6 7 |
# File 'lib/contentdm_api/service.rb', line 5 def function @function end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
5 6 7 |
# File 'lib/contentdm_api/service.rb', line 5 def params @params end |
Instance Method Details
#url_params ⇒ String
URL params for a given service
24 25 26 |
# File 'lib/contentdm_api/service.rb', line 24 def url_params "#{function}/#{all_params.join('/')}" end |