Skip to content

Commit b6d596f

Browse files
committed
Automated update
1 parent 891f5fe commit b6d596f

File tree

9 files changed

+67
-28
lines changed

9 files changed

+67
-28
lines changed

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2013 Gerwin Sturm & Adam Singer
1+
Copyright (c) 2013-2014 Gerwin Sturm & Adam Singer
22

33
Licensed under the Apache License, Version 2.0 (the "License"); you may
44
not use this file except in compliance with the License. You may obtain a

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Adding dependency to pubspec.yaml
1414

1515
```
1616
dependencies:
17-
google_oauth2_v2_api: '>=0.4.11'
17+
google_oauth2_v2_api: '>=0.4.12'
1818
```
1919

2020
For web applications:
@@ -46,7 +46,7 @@ To use authentication create a new `GoogleOAuth2` object and pass it to the cons
4646
### Licenses
4747

4848
```
49-
Copyright (c) 2013 Gerwin Sturm & Adam Singer
49+
Copyright (c) 2013-2014 Gerwin Sturm & Adam Singer
5050
5151
Licensed under the Apache License, Version 2.0 (the "License"); you may
5252
not use this file except in compliance with the License. You may obtain a

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"DGgqtFnjgu83tuwvvVNNUhOiHWk/610kr4ZlL53w3blZCnftCmKVFqI"
1+
"PoXr25DWmmN6KaMjdGmecv0bPt8/czsLFT9it2ZNLIudcLONTk9pYrY"

lib/oauth2_v2_api_client.dart

+1
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ export 'package:google_oauth2_v2_api/src/client_base.dart' show APIRequestError;
1111
part 'src/client/client.dart';
1212
part 'src/client/schemas.dart';
1313
part 'src/client/resources.dart';
14+
part 'src/client/utils.dart';

lib/src/client/resources.dart

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class UserinfoResource_ {
1414
*
1515
* [optParams] - Additional query parameters
1616
*/
17-
async.Future<Userinfo> get({core.Map optParams}) {
17+
async.Future<Userinfoplus> get({core.Map optParams}) {
1818
var url = "oauth2/v2/userinfo";
1919
var urlParams = new core.Map();
2020
var queryParams = new core.Map();
@@ -35,7 +35,7 @@ class UserinfoResource_ {
3535
var response;
3636
response = _client.request(url, "GET", urlParams: urlParams, queryParams: queryParams);
3737
return response
38-
.then((data) => new Userinfo.fromJson(data));
38+
.then((data) => new Userinfoplus.fromJson(data));
3939
}
4040
}
4141

@@ -61,7 +61,7 @@ class UserinfoV2MeResource_ {
6161
*
6262
* [optParams] - Additional query parameters
6363
*/
64-
async.Future<Userinfo> get({core.Map optParams}) {
64+
async.Future<Userinfoplus> get({core.Map optParams}) {
6565
var url = "userinfo/v2/me";
6666
var urlParams = new core.Map();
6767
var queryParams = new core.Map();
@@ -82,7 +82,7 @@ class UserinfoV2MeResource_ {
8282
var response;
8383
response = _client.request(url, "GET", urlParams: urlParams, queryParams: queryParams);
8484
return response
85-
.then((data) => new Userinfo.fromJson(data));
85+
.then((data) => new Userinfoplus.fromJson(data));
8686
}
8787
}
8888

lib/src/client/schemas.dart

+7-16
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class Tokeninfo {
9191

9292
}
9393

94-
class Userinfo {
94+
class Userinfoplus {
9595

9696
/** The user's email address. */
9797
core.String email;
@@ -114,7 +114,7 @@ class Userinfo {
114114
/** URL of the profile page. */
115115
core.String link;
116116

117-
/** The user's default locale. */
117+
/** The user's preferred locale. */
118118
core.String locale;
119119

120120
/** The user's full name. */
@@ -123,14 +123,11 @@ class Userinfo {
123123
/** URL of the user's picture image. */
124124
core.String picture;
125125

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. */
130127
core.bool verified_email;
131128

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) {
134131
if (json.containsKey("email")) {
135132
email = json["email"];
136133
}
@@ -161,15 +158,12 @@ class Userinfo {
161158
if (json.containsKey("picture")) {
162159
picture = json["picture"];
163160
}
164-
if (json.containsKey("timezone")) {
165-
timezone = json["timezone"];
166-
}
167161
if (json.containsKey("verified_email")) {
168162
verified_email = json["verified_email"];
169163
}
170164
}
171165

172-
/** Create JSON Object for Userinfo */
166+
/** Create JSON Object for Userinfoplus */
173167
core.Map toJson() {
174168
var output = new core.Map();
175169

@@ -203,17 +197,14 @@ class Userinfo {
203197
if (picture != null) {
204198
output["picture"] = picture;
205199
}
206-
if (timezone != null) {
207-
output["timezone"] = timezone;
208-
}
209200
if (verified_email != null) {
210201
output["verified_email"] = verified_email;
211202
}
212203

213204
return output;
214205
}
215206

216-
/** Return String representation of Userinfo */
207+
/** Return String representation of Userinfoplus */
217208
core.String toString() => JSON.encode(this.toJson());
218209

219210
}

lib/src/client/utils.dart

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
part of oauth2_v2_api;
2+
3+
class SchemaArray<E> extends dart_collection.ListBase<E> {
4+
core.List innerList = new core.List();
5+
6+
core.int get length => innerList.length;
7+
8+
void set length(core.int length) {
9+
innerList.length = length;
10+
}
11+
12+
void operator[]=(core.int index, E value) {
13+
innerList[index] = value;
14+
}
15+
16+
E operator [](core.int index) => innerList[index];
17+
18+
// Though not strictly necessary, for performance reasons
19+
// you should implement add and addAll.
20+
21+
void add(E value) => innerList.add(value);
22+
23+
void addAll(core.Iterable<E> all) => innerList.addAll(all);
24+
}
25+
26+
27+
class SchemaAnyObject implements core.Map {
28+
core.Map innerMap = new core.Map();
29+
void clear() => innerMap.clear();
30+
core.bool containsKey(core.Object key) => innerMap.containsKey(key);
31+
core.bool containsValue(core.Object value) => innerMap.containsValue(value);
32+
void forEach(void f(key, value)) => innerMap.forEach(f);
33+
core.bool get isEmpty => innerMap.isEmpty;
34+
core.bool get isNotEmpty => innerMap.isNotEmpty;
35+
core.Iterable get keys => innerMap.keys;
36+
core.int get length => innerMap.length;
37+
putIfAbsent(key, ifAbsent()) => innerMap.putIfAbsent(key, ifAbsent);
38+
remove(core.Object key) => innerMap.remove(key);
39+
core.Iterable get values => innerMap.values;
40+
void addAll(core.Map other) => innerMap.addAll(other);
41+
operator [](core.Object key) => innerMap[key];
42+
void operator []=(key, value) {
43+
innerMap[key] = value;
44+
}
45+
}
46+

pubspec.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
name: google_oauth2_v2_api
2-
version: 0.4.11
2+
version: 0.4.12
33
authors:
44
- Adam Singer <[email protected]>
55
- Gerwin Sturm <[email protected]>
66
- Kevin Moore <[email protected]>
77
description: Auto-generated client library for accessing the oauth2 v2 API
88
homepage: https://github.com/dart-gde/discovery_api_dart_client_generator
99
environment:
10-
sdk: '>=0.8.10+6 <2.0.0'
10+
sdk: '>=1.0.0 <2.0.0'
1111
dependencies:
1212
google_oauth2_client: '>=0.3.2'
1313
dev_dependencies:
14-
hop: '>=0.27.1'
14+
hop: '>=0.30.2 <0.31.0'

tool/hop_runner.dart

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ void main(List<String> args) {
1111
'lib/oauth2_v2_api_client.dart'
1212
];
1313

14-
addTask('docs', createDartDocTask(pathList, linkApi: true));
14+
// TODO(adam): re enable when hop_docgen is available
15+
// addTask('docs', createDartDocTask(pathList, linkApi: true));
1516

1617
addTask('analyze', createAnalyzerTask(pathList));
1718

0 commit comments

Comments
 (0)