Skip to content

Commit 6d37508

Browse files
committed
improve pub.dev score
1 parent 03ef131 commit 6d37508

File tree

3 files changed

+59
-52
lines changed

3 files changed

+59
-52
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 6.2.3
2+
- Add twitter username to User class https://github.com/SpinlockLabs/github.dart/pull/228
3+
- Improve pub.dev score
4+
15
## 6.2.2
26
- Fixed typo in documentation
37

README.md

Lines changed: 3 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -19,63 +19,14 @@ Please submit issues and pull requests, help out, or just give encouragement.
1919

2020
## Links
2121

22-
- [Library Demos](http://github.directcode.org/demos/)
22+
- [Library Demos](https://github.directcode.org/demos/)
2323
- [Pub Package](https://pub.dartlang.org/packages/github)
2424
- [Wiki](https://github.com/SpinlockLabs/github.dart/wiki)
2525
- [Latest API reference](https://pub.dev/documentation/github/latest/)
2626

27-
## Getting Started
27+
## Examples
2828

29-
First, add the following to your pubspec.yaml:
30-
31-
```yaml
32-
dependencies:
33-
github: ^6.0.0
34-
```
35-
36-
Then import the library
37-
38-
```dart
39-
import 'package:github/github.dart';
40-
```
41-
42-
and then use it:
43-
44-
### Example
45-
46-
```dart
47-
import 'package:github/github.dart';
48-
49-
Future<void> main() async {
50-
/* Create a GitHub Client, with anonymous authentication by default */
51-
var github = GitHub();
52-
53-
/*
54-
or Create a GitHub Client and have it try to find your token or credentials automatically
55-
In Flutter and in server environments this will search environment variables in this order
56-
GITHUB_ADMIN_TOKEN
57-
GITHUB_DART_TOKEN
58-
GITHUB_API_TOKEN
59-
GITHUB_TOKEN
60-
HOMEBREW_GITHUB_API_TOKEN
61-
MACHINE_GITHUB_API_TOKEN
62-
and then GITHUB_USERNAME and GITHUB_PASSWORD
63-
64-
In a browser it will search keys in the same order first through the query string parameters
65-
and then in window sessionStorage
66-
*/
67-
var github = GitHub(auth: findAuthenticationFromEnvironment());
68-
69-
/* or Create a GitHub Client using an auth token */
70-
var github = GitHub(auth: Authentication.withToken('YourTokenHere'));
71-
72-
/* or Create a GitHub Client using a username and password */
73-
var github = GitHub(auth: Authentication.basic('username', 'password'));
74-
75-
Repository repo = await github.repositories.getRepository(RepositorySlug('user_or_org', 'repo_name'));
76-
/* Do Something with repo */
77-
}
78-
```
29+
See the examples in the example directory to learn how to use some of the features!
7930

8031
## Contacting Us
8132

example/readme.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
## Getting Started
2+
3+
First, add the following to your pubspec.yaml:
4+
5+
```yaml
6+
dependencies:
7+
github: ^6.0.0
8+
```
9+
10+
Then import the library
11+
12+
```dart
13+
import 'package:github/github.dart';
14+
```
15+
16+
and then use it:
17+
18+
### Example
19+
20+
```dart
21+
import 'package:github/github.dart';
22+
23+
Future<void> main() async {
24+
/* Create a GitHub Client, with anonymous authentication by default */
25+
var github = GitHub();
26+
27+
/*
28+
or Create a GitHub Client and have it try to find your token or credentials automatically
29+
In Flutter and in server environments this will search environment variables in this order
30+
GITHUB_ADMIN_TOKEN
31+
GITHUB_DART_TOKEN
32+
GITHUB_API_TOKEN
33+
GITHUB_TOKEN
34+
HOMEBREW_GITHUB_API_TOKEN
35+
MACHINE_GITHUB_API_TOKEN
36+
and then GITHUB_USERNAME and GITHUB_PASSWORD
37+
38+
In a browser it will search keys in the same order first through the query string parameters
39+
and then in window sessionStorage
40+
*/
41+
var github = GitHub(auth: findAuthenticationFromEnvironment());
42+
43+
/* or Create a GitHub Client using an auth token */
44+
var github = GitHub(auth: Authentication.withToken('YourTokenHere'));
45+
46+
/* or Create a GitHub Client using a username and password */
47+
var github = GitHub(auth: Authentication.basic('username', 'password'));
48+
49+
Repository repo = await github.repositories.getRepository(RepositorySlug('user_or_org', 'repo_name'));
50+
/* Do Something with repo */
51+
}
52+
```

0 commit comments

Comments
 (0)