title: representation of files and folder-tree of Google Drive folder using Python API
body: <p>I want to list a google drive folders and files in nested json tree using python class. </p>
  
  <p>i want each data point of structure should be object, i want to wrap whole script in class </p>
  
  <p>Tree should be like this </p>
  
  <pre><code>[
  {
  "name":&lt;folder_name&gt;,
  "id":&lt;folder_id&gt;,
  "type":'folder',
   "children":[
          {
          "name":&lt;folder_name&gt;,
          "id":&lt;folder_id&gt;,
          "type":'folder',
           "children":[
           {
              "name":&lt;folder_name&gt;,
              "id":&lt;folder_id&gt;,
              "type":'folder',
               "children":[..........]
          },
          {
              "name":&lt;file_name&gt;,
              "id":&lt;file_id&gt;,
              "type":'file',
          }
          ]
          },
          {
          "name":&lt;file_name&gt;,
          "id":&lt;file_id&gt;,
          "type":'file',
          }
  ]
  },
  {
  "name":&lt;file_name&gt;,
  "id":&lt;file_id&gt;,
  "type":'file',
  },
  ......................
  ]
  </code></pre>
  
  <p>Thanks </p>