3
내가 여기 기본적인 사용 예를 들어 다음과 같은 작업이 구글-API-루비 클라이언트 보석을 얻기 위해 노력하고있어 : 기본 사용법 내가 붙어있어google-api-ruby-client를 인증하는 방법은 무엇입니까?
require 'google/apis/drive_v2'
Drive = Google::Apis::DriveV2 # Alias the module
drive = Drive::DriveService.new
drive.authorization = ... # See Googleauth or Signet libraries
# Search for files in Drive (first page only)
files = drive.list_files(q: "title contains 'finances'")
files.items.each do |file|
puts file.title
end
는 drive.authorization
입니다. 나는 보석 omniauth-google-oauth2를 통해 이미 사용자에게 권한이 부여 된 토큰을 가지고 있습니다. google-api-ruby-client에서이 토큰을 사용하려면 어떻게해야합니까?
감사
그것은 당신의 응용 프로그램에 따라 다릅니다