module Resas::Api::ClientExt::Request

RESAS API へのリクエストを処理するメソッドを格納するモジュール

Public Instance Methods

get( *args ) click to toggle source

GET メソッドで RESAS API へアクセスするメソッド @return [Resas::Api::Response::Body]

Calls superclass method
# File lib/resas/api/client_ext/request.rb, line 33
def get( *args )
  super
end
path( *args ) click to toggle source

@return [URI::HTTPS or URI::Generic]

# File lib/resas/api/client_ext/request.rb, line 38
def path( *args )
  path, options, *others = Client::Util::PathSettingsNormalizer.process( args )
  full = others.shift

  uri = ( full ? URI( "#{ base_endpoint }/#{ path }" ) : URI( path ) )
  uri.query = options.to_query if options.present?
  uri
end

Private Instance Methods

request( method, *args ) click to toggle source

@return [Resas::Api::Response::Body]

# File lib/resas/api/client_ext/request.rb, line 50
def request( method, *args )
  _path, options, parse_json, generate_instance = Client::Util::RequestSettingsNormalizer.process( args )
  con = connection( parse_json: parse_json, generate_instance: generate_instance )
  response = __request__( con, method, _path, options )
  Resas::Api::Response::Body.new( response.body, self, _path, options )
end