Refactor gapi and gapi.auth2 tests to account for changes in gapi.people

definitions
This commit is contained in:
Joshua O'Brien
2018-12-12 11:54:59 +11:00
parent bd464573d7
commit dd92d2da9b
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -144,7 +144,8 @@ function handleSignoutClick(event: MouseEvent) {
// Load the API and make an API call. Display the results on the screen.
function makeApiCall() {
gapi.client.people.people.get({
resourceName: 'people/me'
resourceName: 'people/me',
personFields: 'names'
}).then((resp) => {
const p = document.createElement('p');
const name = resp.result.names[0].givenName;
+2 -1
View File
@@ -20,7 +20,8 @@ https://developers.google.com/api-client-library/javascript/reference/referenced
}).then(function() {
// 3. Initialize and make the API request.
return gapi.client.people.people.get({
resourceName: 'people/me'
resourceName: 'people/me',
personFields: 'name'
});
}).then(function(response) {
console.log(response.result);