Class: MarketingCloudSDK::ET_ContinueRest

Inherits:
ET_Constructor show all
Defined in:
lib/new.rb

Instance Attribute Summary

Attributes inherited from ET_Constructor

#code, #message, #moreResults, #request_id, #results, #status

Instance Method Summary collapse

Constructor Details

#initialize(authStub, endpoint, qs = nil) ⇒ ET_ContinueRest

Returns a new instance of ET_ContinueRest.



831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
# File 'lib/new.rb', line 831

def initialize(authStub, endpoint, qs = nil)
  authStub.refreshToken

  if qs then
    qs['access_token'] = authStub.authToken
  else
    qs = {"access_token" => authStub.authToken}
  end

  uri = URI.parse(endpoint)
  uri.query = URI.encode_www_form(qs)
  http = Net::HTTP.new(uri.host, uri.port)
  http.use_ssl = true
  request = Net::HTTP::Get.new(uri.request_uri)
  requestResponse = http.request(request)

  @moreResults = false

  super(requestResponse, true)
end