def full_path(path, query: {})
      path = [@base_uri.path, path].map { |i| i.gsub(%r{^/|/$}, '') }.keep_if(&:present?)
      path = "/#{path.join('/')}"

      if query.present?
        path += case query
                when Hash, Array then "?#{URI.encode_www_form(query)}"
                when String then "?#{query}"
                else raise Crapi::ArgumentError, %(Unexpected "query" type: #{query.class})
                end
      end

      path
    end
def full_path(path, query: {})
      path = [@base_uri.path, path].map { |i| i.gsub(%r{^/|/$}, '') }.keep_if(&:present?)
      path = "/#{path.join('/')}"

      if query.present?
        path += case query
                when Hash, Array then "?#{URI.encode_www_form(query)}"
                when String then "?#{query}"
                else raise Crapi::ArgumentError, %(Unexpected "query" type: #{query.class})
                end
      end

      path
    end
Assembles a path and a query string Hash/Array/String into a URI path.


 @param path [String]
   The path to the desired resource.

 @param query [Hash, Array, String]
   Query string values, if any, to append to the given path. Strings are appended as-is;
   Hashes and Arrays are serialized as URI-encoded form data before appending.


 @raise [Crapi::ArgumentError]

 @return [String]