Class: GoogleDriveV0::ApiClientFetcher

Inherits:
Object
  • Object
show all
Defined in:
lib/google_drive_v0/api_client_fetcher.rb

Defined Under Namespace

Classes: Response

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ ApiClientFetcher

Returns a new instance of ApiClientFetcher.



29
30
31
# File 'lib/google_drive_v0/api_client_fetcher.rb', line 29

def initialize(client)
  @client = client
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



33
34
35
# File 'lib/google_drive_v0/api_client_fetcher.rb', line 33

def client
  @client
end

Instance Method Details

#request_raw(method, url, data, extra_header, auth) ⇒ Object



35
36
37
38
39
40
41
42
43
# File 'lib/google_drive_v0/api_client_fetcher.rb', line 35

def request_raw(method, url, data, extra_header, auth)
  p [method, url, data, extra_header, auth]
  client_response = @client.execute(
      :http_method => method,
      :uri => url,
      :body => data,
      :headers => extra_header)
  return Response.new(client_response)
end