module NicoAPI::Base
Public Instance Methods
get()
click to toggle source
# File lib/nicoapi/base.rb, line 27 def get http_client = NicoAPI::HttpClient.new http_client.set_params uri.to_s http_client.get end
params()
click to toggle source
# File lib/nicoapi/base.rb, line 10 def params @params_array.join('&') end
path()
click to toggle source
# File lib/nicoapi/base.rb, line 14 def path if @dynamic_segment.present? static_segment + '/' + @dynamic_segment else static_segment end end
scheme()
click to toggle source
# File lib/nicoapi/base.rb, line 6 def scheme 'http' end
uri()
click to toggle source
# File lib/nicoapi/base.rb, line 22 def uri _uri = scheme + "://" + [ ([host, path].join('/')), params].join('?') URI.escape _uri end