Skip to content
This repository has been archived by the owner on Sep 10, 2022. It is now read-only.

Commit

Permalink
Use version fro 0.8 branch
Browse files Browse the repository at this point in the history
  • Loading branch information
ebidel committed May 28, 2015
1 parent 5b99d5b commit 3f7039d
Showing 1 changed file with 5 additions and 68 deletions.
73 changes: 5 additions & 68 deletions google-sheets.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#### Example
<google-sheets key="..." tab-id="1" client-id="..."></google-sheets>
<script>
var sheet = document.querySelector('google-sheets');
Expand Down Expand Up @@ -48,17 +49,6 @@
<google-map-marker latitude="{{gsx$lat.$t}}" longitude="{{gsx$lng.$t}}">
</template>
</google-map>
<b>Example</b> - access to a private spreadsheet requires `<google-signin>`:
<google-sheets key="..."></google-sheets>
<google-signin clientId="..." scopes="https://spreadsheets.google.com/feeds"></google-signin>
@element google-sheets
@blurb Element for interacting with Google Sheets.
@status alpha
@homepage https://googlewebcomponents.github.io/google-sheets
>>>>>>> 8cbfb155dd454c0f0cf548aed0fca05beaae6032
-->


Expand All @@ -79,6 +69,7 @@
on-response="_onWorksheet"></iron-ajax>
<iron-ajax id="cellrowsajax" params='{"alt": "json"}' handle-as="json"
on-response="_onCellRows"></iron-ajax>

</template>
</dom-module>

Expand Down Expand Up @@ -115,62 +106,6 @@
}

window.GoogleSheets = Polymer({
/**
* The key of the spreadsheet. This can be found in the URL when viewing
* the document is Google Docs (e.g. `docs.google.com/spreadsheet/ccc?key=<KEY>`).
*
* Leaving off this attribute still returns a list of the users spreadsheets in the `spreadsheets` property.
*
* @attribute key
* @type string
* @default ''
*/
key: '',

/**
* Tab within a spreadsheet. For example, the first tab in a spreadsheet
* would be `tab="1"`.
*
* @attribute tabid
* @type number
* @default 1
*/
tabid: 1,

/**
* A hint that the spreadsheet is published publicly in Google Docs. Used as a performance optimization.
* Make sure the sheet is also publicly viewable by anyone in the Share settings.
*
* @attribute published
* @type boolean
* @default false
*/
published: false,

worksheetId_: null,

/**
* List of the user's spreadsheets. Shared across instances.
*
* @property spreadsheets
* @type array
*/
spreadsheets: [],

/**
* The URL to open this spreadsheet in Google Sheets.
*
* @property openInGoogleDocsURL
* @readonly
* @type string
*/
get openInGoogleDocsURL() {
var url = 'https://docs.google.com/spreadsheet/';
if (this.key) {
url += 'ccc?key=' + this.key;
}
//url += '#gid=' + this.gid;
>>>>>>> 8cbfb155dd454c0f0cf548aed0fca05beaae6032

is: 'google-sheets',

Expand Down Expand Up @@ -360,7 +295,7 @@
var oauthToken = gapi.auth.getToken();

var headers = {
'Authorization': 'Bearer ' + detail.user.getAuthResponse().access_token
'Authorization': 'Bearer ' + oauthToken.access_token
};

this.$.listsheetsajax.headers = headers;
Expand Down Expand Up @@ -470,6 +405,8 @@
data: this.rows
});
}

});

})();
</script>

0 comments on commit 3f7039d

Please sign in to comment.