Class: Obecon::Client
Constant Summary collapse
- USER_AGENT =
"ASK HELMUT Oberbaum Concept Client #{VERSION}"- MOVIE_PARAM_NAME =
"id"- DEFAULT_OPTIONS =
{ host: "www.rce-event.de", path: "/api/filepool.php", }.freeze
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
-
#host ⇒ Object
accessors for options.
-
#initialize(options = {}) ⇒ Client
constructor
A new instance of Client.
- #movie(movie_id) ⇒ Object
- #path ⇒ Object
- #token ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Client
Returns a new instance of Client.
17 18 19 20 |
# File 'lib/obecon/client.rb', line 17 def initialize( = {}) () raise ArgumentError, "A token must be present" if token.nil? end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
14 15 16 |
# File 'lib/obecon/client.rb', line 14 def end |
Instance Method Details
#host ⇒ Object
accessors for options
30 31 32 |
# File 'lib/obecon/client.rb', line 30 def host [:host] end |
#movie(movie_id) ⇒ Object
22 23 24 25 26 |
# File 'lib/obecon/client.rb', line 22 def movie(movie_id) handle_response do self.class.get(build_query(movie_id)).body end end |
#path ⇒ Object
34 35 36 |
# File 'lib/obecon/client.rb', line 34 def path [:path] end |
#token ⇒ Object
38 39 40 |
# File 'lib/obecon/client.rb', line 38 def token [:token] end |