Module: Resas::Api::ClientExt::Request

Extended by:
ActiveSupport::Concern
Defined in:
lib/resas/api/client_ext/request.rb

Overview

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

Instance Method Summary collapse

Instance Method Details

#get(*args) ⇒ Resas::Api::Response::Body

GET メソッドで RESAS API へアクセスするメソッド



33
34
35
# File 'lib/resas/api/client_ext/request.rb', line 33

def get( *args )
  super
end

#path(*args) ⇒ URI::HTTPS or URI::Generic

Returns:

  • (URI::HTTPS or URI::Generic)


38
39
40
41
42
43
44
45
# 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