Polymer and Google-Sheets component loading ALL spreadsheets

130 Views Asked by At

I'm building a Polymer app and I'm trying to load all spreadsheets from a google drive account but am having trouble. I can bring individual spreadsheets in at a time, but is there a way to bring all in at once? The docs(attached) say it is possible by leaving out the key but i'm not having any luck. Please find my code below. Any help would be much appreciated. Justin

my-dashboard.html

The below works for individual spreadsheets

<google-sheets
        key="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
        client-id="XXXXXXXXXXXXXX.apps.googleusercontent.com"
        rows="{{rows}}"
        published >
    </google-sheets>

    <my-googlesheets-element rows="{{rows}}" user="[[user]]"></my-googlesheets-element>

my-googlesheets-element.html

<dom-module id="my-googlesheets-element">
  <template>
    <style></style>
    <h1>google sheet comp here</h1>

    <template is="dom-repeat" items="{{rows}}">
      <div id$="[[item.$key]]">
        <p>{{item.gsx$author.$t}}</p>
      </div>
    </template>

  </template>
  <script>
    Polymer({
      is: "my-googlesheets-element",
      properties: {
        rows: {
          type: Object
        },
      },
      observers: [ 'logRows(rows.*)' ],
      logRows: function() {
        console.log('rows data', this.rows)
      },
    })
  </script>
</dom-module>
0

There are 0 best solutions below