Skip to content

Commit 5f43e7c

Browse files
committed
Automated update
1 parent 62f8a40 commit 5f43e7c

File tree

11 files changed

+38
-39
lines changed

11 files changed

+38
-39
lines changed

CONTRIBUTORS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
Adam Singer (https://github.com/financeCoding)
22
Gerwin Sturm (https://github.com/Scarygami, http://scarygami.net/+)
3+
Damon Douglas (https://github.com/damondouglas)
4+
Kevin Moore ([email protected])

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"DsY8aw3zSOMYNAy_X4JnK21hrvA/Rq5ZUxOQv3EpPxhPSvrsthtH0_4"
1+
"0kaFfN0xfjZjASExv-gUnrWhdto/Rq5ZUxOQv3EpPxhPSvrsthtH0_4"

lib/src/browser/browserclient.dart

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ part of taskqueue_v1beta1_api_browser;
55
*/
66
abstract class BrowserClient extends Client {
77

8-
oauth.OAuth2 _auth;
8+
final oauth.OAuth2 _auth;
99
core.bool _jsClientLoaded = false;
1010

1111
BrowserClient([oauth.OAuth2 this._auth]) : super();
@@ -15,27 +15,27 @@ abstract class BrowserClient extends Client {
1515
*/
1616
async.Future<core.bool> _loadJsClient() {
1717
var completer = new async.Completer();
18-
18+
1919
if (_jsClientLoaded) {
2020
completer.complete(true);
2121
return completer.future;
2222
}
23-
23+
2424
js.scoped((){
2525
js.context.handleClientLoad = new js.Callback.once(() {
2626
_jsClientLoaded = true;
2727
completer.complete(true);
2828
});
2929
});
30-
30+
3131
html.ScriptElement script = new html.ScriptElement();
3232
script.src = "http://apis.google.com/js/client.js?onload=handleClientLoad";
3333
script.type = "text/javascript";
3434
html.document.body.children.add(script);
35-
35+
3636
return completer.future;
3737
}
38-
38+
3939
/**
4040
* Makes a request via the JS Client Library to circumvent CORS-problems
4141
*/
@@ -45,19 +45,19 @@ abstract class BrowserClient extends Client {
4545
requestData["path"] = requestUrl;
4646
requestData["method"] = method;
4747
requestData["headers"] = new core.Map();
48-
48+
4949
if (queryParams != null) {
5050
requestData["params"] = queryParams;
5151
}
52-
52+
5353
if (body != null) {
5454
requestData["body"] = body;
5555
requestData["headers"]["Content-Type"] = contentType;
5656
}
5757
if (makeAuthRequests && _auth != null && _auth.token != null) {
5858
requestData["headers"]["Authorization"] = "${_auth.token.type} ${_auth.token.data}";
5959
}
60-
60+
6161
js.scoped(() {
6262
var request = js.context.gapi.client.request(js.map(requestData));
6363
var callback = new js.Callback.once((jsonResp, rawResp) {
@@ -66,15 +66,15 @@ abstract class BrowserClient extends Client {
6666
if (raw["gapiRequest"]["data"]["status"] >= 400) {
6767
completer.completeError(new APIRequestException("JS Client - ${raw["gapiRequest"]["data"]["status"]} ${raw["gapiRequest"]["data"]["statusText"]} - ${raw["gapiRequest"]["data"]["body"]}"));
6868
} else {
69-
completer.complete({});
69+
completer.complete({});
7070
}
7171
} else {
7272
completer.complete(js.context.JSON.stringify(jsonResp));
7373
}
7474
});
7575
request.execute(callback);
7676
});
77-
77+
7878
return completer.future;
7979
}
8080

@@ -133,7 +133,7 @@ abstract class BrowserClient extends Client {
133133
if (request.responseText != null) {
134134
var errorJson;
135135
try {
136-
errorJson = JSON.parse(request.responseText);
136+
errorJson = JSON.parse(request.responseText);
137137
} on core.FormatException {
138138
errorJson = null;
139139
}

lib/src/browser/taskqueue.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class Taskqueue extends BrowserClient {
6666

6767
Taskqueue([oauth.OAuth2 auth]) : super(auth) {
6868
basePath = "/taskqueue/v1beta1/projects/";
69-
rootUrl = "https://www.googleapis.com:443/";
69+
rootUrl = "https://www.googleapis.com/";
7070
_taskqueues = new TaskqueuesResource_(this);
7171
_tasks = new TasksResource_(this);
7272
}

lib/src/common/schemas.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ part of taskqueue_v1beta1_api_client;
33
class Task {
44

55
/** Time (in seconds since the epoch) at which the task was enqueued. */
6-
core.String enqueueTimestamp;
6+
core.int enqueueTimestamp;
77

88
/** Name of the task. */
99
core.String id;
@@ -12,7 +12,7 @@ class Task {
1212
core.String kind;
1313

1414
/** Time (in seconds since the epoch) at which the task lease will expire. This value is 0 if the task isnt currently leased out to a worker. */
15-
core.String leaseTimestamp;
15+
core.int leaseTimestamp;
1616

1717
/** A bag of bytes which is the task payload. The payload on the JSON side is always Base64 encoded. */
1818
core.String payloadBase64;
@@ -206,13 +206,13 @@ class TaskQueueAcl {
206206
class TaskQueueStats {
207207

208208
/** Number of tasks leased in the last hour. */
209-
core.String leasedLastHour;
209+
core.int leasedLastHour;
210210

211211
/** Number of tasks leased in the last minute. */
212-
core.String leasedLastMinute;
212+
core.int leasedLastMinute;
213213

214214
/** The timestamp (in seconds since the epoch) of the oldest unfinished task. */
215-
core.String oldestTask;
215+
core.int oldestTask;
216216

217217
/** Number of tasks in the queue. */
218218
core.int totalTasks;

lib/src/console/consoleclient.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ part of taskqueue_v1beta1_api_console;
55
*/
66
abstract class ConsoleClient extends Client {
77

8-
oauth2.OAuth2Console _auth;
8+
oauth2.OAuth2Console _auth;
99

1010
ConsoleClient([oauth2.OAuth2Console this._auth]) : super();
1111

@@ -52,7 +52,7 @@ abstract class ConsoleClient extends Client {
5252
var postHttpClient = new io.HttpClient();
5353

5454
// On connection request set the content type and key if available.
55-
postHttpClient.openUrl(method, uri.Uri.parse(url)).then((io.HttpClientRequest request) {
55+
postHttpClient.openUrl(method, core.Uri.parse(url)).then((io.HttpClientRequest request) {
5656
request.headers.set(io.HttpHeaders.CONTENT_TYPE, contentType);
5757
if (makeAuthRequests && _auth != null) {
5858
request.headers.set(io.HttpHeaders.AUTHORIZATION, "Bearer ${_auth.credentials.accessToken}");
@@ -64,8 +64,8 @@ abstract class ConsoleClient extends Client {
6464
.then((io.HttpClientResponse response) {
6565
// On connection response read in data from stream, on close parse as json and return.
6666
core.StringBuffer onResponseBody = new core.StringBuffer();
67-
response.transform(new io.StringDecoder()).listen((core.String data) => onResponseBody.write(data),
68-
onError: (error) => completer.completeError(new APIRequestException("POST stream error: $error")),
67+
response.transform(new io.StringDecoder()).listen((core.String data) => onResponseBody.write(data),
68+
onError: (error) => completer.completeError(new APIRequestException("POST stream error: $error")),
6969
onDone: () {
7070
var data = JSON.parse(onResponseBody.toString());
7171
completer.complete(data);
@@ -76,7 +76,7 @@ abstract class ConsoleClient extends Client {
7676
} else if (method.toLowerCase() == "delete") {
7777
var deleteHttpClient = new io.HttpClient();
7878

79-
deleteHttpClient.openUrl(method, uri.Uri.parse(url)).then((io.HttpClientRequest request) {
79+
deleteHttpClient.openUrl(method, core.Uri.parse(url)).then((io.HttpClientRequest request) {
8080
// On connection request set the content type and key if available.
8181
request.headers.set(io.HttpHeaders.CONTENT_TYPE, contentType);
8282
if (makeAuthRequests && _auth != null) {

lib/src/console/taskqueue.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class Taskqueue extends ConsoleClient {
6666

6767
Taskqueue([oauth2.OAuth2Console auth]) : super(auth) {
6868
basePath = "/taskqueue/v1beta1/projects/";
69-
rootUrl = "https://www.googleapis.com:443/";
69+
rootUrl = "https://www.googleapis.com/";
7070
_taskqueues = new TaskqueuesResource_(this);
7171
_tasks = new TasksResource_(this);
7272
}

lib/taskqueue_v1beta1_api_console.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ export "taskqueue_v1beta1_api_client.dart";
66
import "dart:core" as core;
77
import "dart:io" as io;
88
import "dart:async" as async;
9-
import "dart:uri" as uri;
109
import "dart:json" as JSON;
1110
import "package:http/http.dart" as http;
1211
import "package:google_oauth2_client/google_oauth2_console.dart" as oauth2;

pubspec.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
name: google_taskqueue_v1beta1_api
2-
version: 0.1.5
2+
version: 0.1.6
33
description: Auto-generated client library for accessing the taskqueue v1beta1 API
44
homepage: https://github.com/dart-gde/discovery_api_dart_client_generator
55
authors:
66
- Gerwin Sturm <[email protected]>
77
- Adam Singer <[email protected]>
88
environment:
9-
sdk: '>=0.4.7+1.r21548'
9+
sdk: '>=0.5.13'
1010
dependencies:
11-
js: '>=0.0.20'
12-
google_oauth2_client: '>=0.2.11'
11+
js: '>=0.0.22'
12+
google_oauth2_client: '>=0.2.14'
1313
hop: any

test/run.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ set -e
66
# Type Analysis
77

88
echo
9-
echo "dart_analyzer lib/*.dart"
9+
echo "dartanalyzer lib/*.dart"
1010

11-
results=`dart_analyzer lib/*.dart 2>&1`
11+
results=`dartanalyzer lib/*.dart 2>&1`
1212

1313
echo "$results"
1414

0 commit comments

Comments
 (0)