Module: NicoAPI::Base
- Included in:
- GetThumbInfo, Mylist, TagSearch, VideoArray
- Defined in:
- lib/nicoapi/base.rb
Instance Method Summary collapse
Instance Method Details
#get ⇒ Object
27 28 29 30 31 |
# File 'lib/nicoapi/base.rb', line 27 def get http_client = NicoAPI::HttpClient.instance http_client.set_params uri.to_s http_client.get end |
#params ⇒ Object
10 11 12 |
# File 'lib/nicoapi/base.rb', line 10 def params @params_array.join('&') end |
#path ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/nicoapi/base.rb', line 14 def path if @dynamic_segment.present? static_segment + '/' + @dynamic_segment else static_segment end end |
#scheme ⇒ Object
6 7 8 |
# File 'lib/nicoapi/base.rb', line 6 def scheme 'http' end |
#uri ⇒ Object
22 23 24 25 |
# File 'lib/nicoapi/base.rb', line 22 def uri _uri = scheme + "://" + [ ([host, path].join('/')), params].join('?') URI.escape _uri end |