title: Creating a folder using Google Drive API : Resource has no method "insert'
body: <p>I want to create a folder on google drive using the Python API.
  Here is the function:</p>
  
  <pre><code>def create_folder(file_path, parentId=None):
      body = {
      'name': os.path.basename(file_path),
      'mimeType': "application/vnd.google-apps.folder"
      }
      if parentId:
          body['parents'] = parentId
  
      results = service.files().insert(body=body).execute()
      return results
  </code></pre>
  
  <p>But it gives the error:</p>
  
  <pre><code>AttributeError: 'Resource' object has no attribute 'insert'
  </code></pre>
  
  <p>I thought it would work just like the <code>get</code> and <code>list</code> methods here-
  <a href="https://developers.google.com/drive/v2/reference/files#methods" rel="nofollow noreferrer">https://developers.google.com/drive/v2/reference/files#methods</a></p>
  
  <p>I found an answer here: 
  <a href="https://stackoverflow.com/questions/13558653/how-can-i-create-a-new-folder-with-google-drive-api-in-python">How can I create a new folder with Google Drive API in Python?</a></p>
  
  <p>What am I missing?</p>