Skip to content

Commit 18a0f7d

Browse files
committed
Update Experiments
1 parent cf5c12b commit 18a0f7d

File tree

11 files changed

+12
-50
lines changed

11 files changed

+12
-50
lines changed

test/experiment/ati.dart

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,8 @@ import "package:github/server.dart";
22
import "package:github/dates.dart";
33

44
void main() {
5-
initGitHub();
6-
75
var slug = new RepositorySlug("DirectMyFile", "github.dart");
8-
9-
var github = new GitHub(
10-
auth: new Authentication.withToken(
11-
"7d8ec1e36b6b60352dd52a6b0b6520a8390e3152"));
6+
var github = createGitHubClient();
127

138
github.repositories.getRepository(slug).then((repository) {
149
print("Name: ${repository.name}");

test/experiment/blog.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
import "package:github/server.dart";
22

33
void main() {
4-
initGitHub();
5-
6-
var github = new GitHub(
7-
auth: new Authentication.withToken(
8-
"5fdec2b77527eae85f188b7b2bfeeda170f26883"));
4+
var github = createGitHubClient();
95

106
github.blog.listPosts().listen((post) {
117
print(post.title);

test/experiment/directcode_keys.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ import "package:github/server.dart";
33
import "package:quiver/async.dart";
44

55
void main() {
6-
var github = createGitHubClient(
7-
auth: new Authentication.withToken(
8-
"5fdec2b77527eae85f188b7b2bfeeda170f26883"));
6+
var github = createGitHubClient();
7+
98
github.organizations.get("DirectMyFile").then((organization) {
109
return github.organizations.listTeams(organization.name).toList();
1110
}).then((teams) {

test/experiment/error_handling.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,12 @@ import 'dart:io';
66
import 'dart:convert';
77

88
void main() {
9-
initGitHub();
9+
var github = createGitHubClient();
1010
var response = new MockResponse(JSON.encode({
1111
"message": "Invalid Entity",
1212
"errors": [{"resource": "Issue", "field": "body", "code": "not_found"}]
1313
}), {}, 422);
1414

15-
var github = new GitHub();
16-
1715
try {
1816
github.handleStatusCode(response);
1917
} on ValidationFailed catch (e) {

test/experiment/polling.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
import "package:github/server.dart";
22

33
void main() {
4-
initGitHub();
5-
6-
var github = new GitHub(
7-
auth: new Authentication.withToken(
8-
"5fdec2b77527eae85f188b7b2bfeeda170f26883"));
4+
var github = createGitHubClient();
95

106
EventPoller poller = github.activity.pollPublicEvents();
117

test/experiment/public_repos.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
import "package:github/server.dart";
22

33
void main() {
4-
initGitHub();
5-
6-
var github = new GitHub(
7-
auth: new Authentication.withToken(
8-
"5fdec2b77527eae85f188b7b2bfeeda170f26883"));
4+
var github = createGitHubClient();
95

106
github.repositories.listPublicRepositories(limit: 10).listen((repo) {
117
print("-> ${repo.fullName}");

test/experiment/readme.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
import "package:github/server.dart";
22

33
void main() {
4-
initGitHub();
5-
6-
var github = new GitHub(
7-
auth: new Authentication.withToken(
8-
"5fdec2b77527eae85f188b7b2bfeeda170f26883"));
4+
var github = createGitHubClient();
95

106
github.repositories
117
.getReadme(new RepositorySlug("DirectMyFile", "github.dart"))

test/experiment/search.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
import "package:github/server.dart";
22

33
void main() {
4-
initGitHub();
5-
6-
var github = new GitHub(
7-
auth: new Authentication.withToken(
8-
"5fdec2b77527eae85f188b7b2bfeeda170f26883"));
4+
var github = createGitHubClient();
95

106
github.search.repositories("github").listen((repo) {
117
print(

test/experiment/showcases.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
import "package:github/server.dart";
22

33
void main() {
4-
initGitHub();
5-
6-
var github = new GitHub(
7-
auth: new Authentication.withToken(
8-
"5fdec2b77527eae85f188b7b2bfeeda170f26883"));
4+
var github = createGitHubClient();
95

106
github.explore.listShowcases().listen((info) {
117
print("- ${info.title}");

test/experiment/trending.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
import "package:github/server.dart";
22

33
void main() {
4-
initGitHub();
5-
6-
var github = new GitHub();
4+
var github = createGitHubClient();
75

86
github.explore
97
.listTrendingRepositories(language: "Dart", since: "month")

test/experiment/wisdom.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
import "package:github/server.dart";
22

33
void main() {
4-
initGitHub();
5-
6-
var github = new GitHub(
7-
auth: new Authentication.withToken(
8-
"5fdec2b77527eae85f188b7b2bfeeda170f26883"));
4+
var github = createGitHubClient();
95

106
github.misc.getWisdom().then((value) {
117
print(value);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy