def generate_query_params(params = {})
      params = params.reject { |_k, v| v.nil? || ((v.instance_of? Array) && v.empty?) }
      return '' if params.empty?

      params.inject('?') do |ret, (k, v)|
        ret += '&' unless ret == '?'
        part = v.instance_of?(Array) ? "#{k}=#{v.join(',')}" : "#{k}=#{v}"
        ret + hawk_escape(part)
      end
    end
def generate_query_params(params = {})
      params = params.reject { |_k, v| v.nil? || ((v.instance_of? Array) && v.empty?) }
      return '' if params.empty?

      params.inject('?') do |ret, (k, v)|
        ret += '&' unless ret == '?'
        part = v.instance_of?(Array) ? "#{k}=#{v.join(',')}" : "#{k}=#{v}"
        ret + hawk_escape(part)
      end
    end
Generate a query string from the passed hash, starting with '?'
 Values may be an array, in which case the array values are joined together by `,`.
 @param params [Hash] key-values pairs
 @return [String] complete query string to append to a base url, '' if no valid params