Module: Songkick::Transport::Base::API
- Included in:
- Songkick::Transport::Base, BasicAuthDecorator, HeaderDecorator, ParamsDecorator, TimeoutDecorator
- Defined in:
- lib/songkick/transport/base.rb
Instance Method Summary collapse
- #delete(path, params = {}, head = {}, timeout = nil) ⇒ Object
- #get(path, params = {}, head = {}, timeout = nil) ⇒ Object
- #head(path, params = {}, head = {}, timeout = nil) ⇒ Object
- #options(path, params = {}, head = {}, timeout = nil) ⇒ Object
- #patch(path, params = {}, head = {}, timeout = nil) ⇒ Object
- #post(path, params = {}, head = {}, timeout = nil) ⇒ Object
- #put(path, params = {}, head = {}, timeout = nil) ⇒ Object
- #with_basic_auth(credentials) ⇒ Object
- #with_headers(headers = {}) ⇒ Object
- #with_params(params) ⇒ Object
- #with_timeout(timeout) ⇒ Object
Instance Method Details
#delete(path, params = {}, head = {}, timeout = nil) ⇒ Object
22 23 24 |
# File 'lib/songkick/transport/base.rb', line 22 def delete(path, params = {}, head = {}, timeout = nil) do_verb("delete", path, params, head, timeout) end |
#get(path, params = {}, head = {}, timeout = nil) ⇒ Object
6 7 8 |
# File 'lib/songkick/transport/base.rb', line 6 def get(path, params = {}, head = {}, timeout = nil) do_verb("get", path, params, head, timeout) end |
#head(path, params = {}, head = {}, timeout = nil) ⇒ Object
30 31 32 |
# File 'lib/songkick/transport/base.rb', line 30 def head(path, params = {}, head = {}, timeout = nil) do_verb("head", path, params, head, timeout) end |
#options(path, params = {}, head = {}, timeout = nil) ⇒ Object
26 27 28 |
# File 'lib/songkick/transport/base.rb', line 26 def (path, params = {}, head = {}, timeout = nil) do_verb("options", path, params, head, timeout) end |
#patch(path, params = {}, head = {}, timeout = nil) ⇒ Object
18 19 20 |
# File 'lib/songkick/transport/base.rb', line 18 def patch(path, params = {}, head = {}, timeout = nil) do_verb("patch", path, params, head, timeout) end |
#post(path, params = {}, head = {}, timeout = nil) ⇒ Object
10 11 12 |
# File 'lib/songkick/transport/base.rb', line 10 def post(path, params = {}, head = {}, timeout = nil) do_verb("post", path, params, head, timeout) end |
#put(path, params = {}, head = {}, timeout = nil) ⇒ Object
14 15 16 |
# File 'lib/songkick/transport/base.rb', line 14 def put(path, params = {}, head = {}, timeout = nil) do_verb("put", path, params, head, timeout) end |
#with_basic_auth(credentials) ⇒ Object
46 47 48 |
# File 'lib/songkick/transport/base.rb', line 46 def with_basic_auth(credentials) BasicAuthDecorator.new(self, credentials) end |
#with_headers(headers = {}) ⇒ Object
34 35 36 |
# File 'lib/songkick/transport/base.rb', line 34 def with_headers(headers = {}) HeaderDecorator.new(self, headers) end |
#with_params(params) ⇒ Object
42 43 44 |
# File 'lib/songkick/transport/base.rb', line 42 def with_params(params) ParamsDecorator.new(self, params) end |
#with_timeout(timeout) ⇒ Object
38 39 40 |
# File 'lib/songkick/transport/base.rb', line 38 def with_timeout(timeout) TimeoutDecorator.new(self, timeout) end |