Class: GoogleDrive::OAuth1Fetcher

Inherits:
Object
  • Object
show all
Defined in:
lib/google_drive/oauth1_fetcher.rb

Overview

:nodoc:

Instance Method Summary collapse

Constructor Details

#initialize(oauth1_token) ⇒ OAuth1Fetcher

Returns a new instance of OAuth1Fetcher.



12
13
14
# File 'lib/google_drive/oauth1_fetcher.rb', line 12

def initialize(oauth1_token)
  @oauth1_token = oauth1_token
end

Instance Method Details

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



16
17
18
19
20
21
22
# File 'lib/google_drive/oauth1_fetcher.rb', line 16

def request_raw(method, url, data, extra_header, auth)
  if method == :delete || method == :get
    return @oauth1_token.__send__(method, url, extra_header)
  else
    return @oauth1_token.__send__(method, url, data, extra_header)
  end
end