Sha256: 0b2e92ebbaf0524263dbcda2a9ca6a52d03d1451b5b9379c0beca817f024baec
Contents?: true
Size: 670 Bytes
Versions: 2
Compression:
Stored size: 670 Bytes
Contents
require_relative "HttpHelper" class RequestBase attr_accessor :http_helper, :query_params def initialize(api_key, access_token) #puts "here is my token #{access_token}" @http_helper = HttpHelper.new(api_key, access_token) @query_params = Hash.new end public def with_response_fields(fields) build_query_params("fields", fields.join(",")) return self end public def with_response_field(field) build_query_params("fields", field) return self end protected def build_query_params(key, value) @query_params[key].nil? ? @query_params[key] = value : @query_params[key] << "," + value end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ConnectSDK-1.0.2.Beta | lib/RequestBase.rb |
ConnectSDK-1.0.1.Beta | lib/RequestBase.rb |