@@ -91,7 +91,7 @@ class Tokeninfo {
91
91
92
92
}
93
93
94
- class Userinfo {
94
+ class Userinfoplus {
95
95
96
96
/** The user's email address. */
97
97
core.String email;
@@ -114,7 +114,7 @@ class Userinfo {
114
114
/** URL of the profile page. */
115
115
core.String link;
116
116
117
- /** The user's default locale. */
117
+ /** The user's preferred locale. */
118
118
core.String locale;
119
119
120
120
/** The user's full name. */
@@ -123,14 +123,11 @@ class Userinfo {
123
123
/** URL of the user's picture image. */
124
124
core.String picture;
125
125
126
- /** The user's default timezone. */
127
- core.String timezone;
128
-
129
- /** Boolean flag which is true if the email address is verified. */
126
+ /** Boolean flag which is true if the email address is verified. Always verified because we only return the user's primary email address. */
130
127
core.bool verified_email;
131
128
132
- /** Create new Userinfo from JSON data */
133
- Userinfo .fromJson (core.Map json) {
129
+ /** Create new Userinfoplus from JSON data */
130
+ Userinfoplus .fromJson (core.Map json) {
134
131
if (json.containsKey ("email" )) {
135
132
email = json["email" ];
136
133
}
@@ -161,15 +158,12 @@ class Userinfo {
161
158
if (json.containsKey ("picture" )) {
162
159
picture = json["picture" ];
163
160
}
164
- if (json.containsKey ("timezone" )) {
165
- timezone = json["timezone" ];
166
- }
167
161
if (json.containsKey ("verified_email" )) {
168
162
verified_email = json["verified_email" ];
169
163
}
170
164
}
171
165
172
- /** Create JSON Object for Userinfo */
166
+ /** Create JSON Object for Userinfoplus */
173
167
core.Map toJson () {
174
168
var output = new core.Map ();
175
169
@@ -203,17 +197,14 @@ class Userinfo {
203
197
if (picture != null ) {
204
198
output["picture" ] = picture;
205
199
}
206
- if (timezone != null ) {
207
- output["timezone" ] = timezone;
208
- }
209
200
if (verified_email != null ) {
210
201
output["verified_email" ] = verified_email;
211
202
}
212
203
213
204
return output;
214
205
}
215
206
216
- /** Return String representation of Userinfo */
207
+ /** Return String representation of Userinfoplus */
217
208
core.String toString () => JSON .encode (this .toJson ());
218
209
219
210
}
0 commit comments