title: Getting WebViewLinks with Google Drive
body: <p>I've just started trying to use the Google Drive API. Using the quickstart guide I set up the authentication, I can print a list of my files and I can even make copies. All that works great, however I'm having trouble trying to access data from a file on Drive. In particular, I'm trying to get a <code>WebViewLink</code>, however when I call <code>.get</code> I receive only a small dictionary that has barely any of the file's metadata. <a href="https://developers.google.com/resources/api-libraries/documentation/drive/v3/python/latest/drive_v3.files.html#get" rel="nofollow">The documentation</a> makes it look like all the data should just be there by default but it's not appearing. I couldn't find any way to flag for requesting any additional information.</p>
  
  <pre><code>credentials = get_credentials()
  http = credentials.authorize(httplib2.Http())
  service = discovery.build('drive', 'v3', http=http)
  
  results = service.files().list(fields="nextPageToken, files(id, name)").execute()
  items = results.get('files', [])
  if not items:
      print('No files found.')
  else:
      print('Files:')
      for item in items:
          print(item['name'], item['id'])
          if "Target File" in item['name']:
              d = service.files().get(fileId=item['id']).execute()
              print(repr(d))
  </code></pre>
  
  <p>This is the output of the above code: (the formatting is my doing)</p>
  
  <pre><code>{u'mimeType': u'application/vnd.google-apps.document', 
   u'kind': u'drive#file',
   u'id': u'1VO9cC8mGM67onVYx3_2f-SYzLJPR4_LteQzILdWJgDE',
   u'name': u'Fix TVP Licence Issues'}
  </code></pre>
  
  <p>For anyone confused about the code there is some missing that's just the basic <code>get_credentials</code> function from the API's <a href="https://developers.google.com/gmail/api/quickstart/python" rel="nofollow">quickstart page</a> and some constants and imports. For completeness, here's all that stuff, unmodified in my code:</p>
  
  <pre><code>from __future__ import print_function
  import httplib2
  import os
  
  from apiclient import discovery
  import oauth2client
  from oauth2client import client
  from oauth2client import tools
  
  SCOPES = 'https://www.googleapis.com/auth/drive'
  CLIENT_SECRET_FILE = 'client_secret.json'
  APPLICATION_NAME = 'Drive API Python Quickstart'
  
  try:
      import argparse
      flags = argparse.ArgumentParser(parents=[tools.argparser]).parse_args()
  except ImportError:
      flags = None
  
  
  def get_credentials():
      """Gets valid user credentials from storage.
  
      If nothing has been stored, or if the stored credentials are invalid,
      the OAuth2 flow is completed to obtain the new credentials.
  
      Returns:
          Credentials, the obtained credential.
      """
      home_dir = os.path.expanduser('~')
      credential_dir = os.path.join(home_dir, '.credentials')
      if not os.path.exists(credential_dir):
          os.makedirs(credential_dir)
      credential_path = os.path.join(credential_dir,
                                     'drive-python-quickstart.json')
  
      store = oauth2client.file.Storage(credential_path)
      credentials = store.get()
      if not credentials or credentials.invalid:
          flow = client.flow_from_clientsecrets(CLIENT_SECRET_FILE, SCOPES)
          flow.user_agent = APPLICATION_NAME
          if flags:
              credentials = tools.run_flow(flow, store, flags)
          else: # Needed only for compatibility with Python 2.6
              credentials = tools.run(flow, store)
          print('Storing credentials to ' + credential_path)
      return credentials
  </code></pre>
  
  <p>So what's missing, how can I get the API to return all that extra meta data that's just not appearing right now?</p>