Skip to content

Commit 42cb970

Browse files
committed
chore: update Readme to reflect 2.x breaking change; drop 0.10 test on 6.x; update changelog
Fixes #338
1 parent 7d9afd0 commit 42cb970

File tree

3 files changed

+30
-17
lines changed

3 files changed

+30
-17
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
sudo: false
22
language: node_js
33
node_js:
4+
- '6'
45
- '5'
56
- '4'
67
- '0.12'
7-
- '0.10'
8+
89
cache:
910
directories:
1011
- node_modules

CHANGELOG.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
# Change Log
22

3-
## master
3+
## 2.1.0
44
### Features
5+
Team API
6+
* `Organization.getTeams`
7+
* `Team.getTeam`
8+
* `Team.listRepos`
9+
* `Team.editTeam`
10+
* `Team.listMembers`
11+
* `Team.getMembership`
12+
* `Team.addMembership`
13+
* `Team.isManagedRepo`
14+
* `Team.manageRepo`
15+
* `Team.unmanageRepo`
16+
* `Team.deleteTeam`
517

618
### Fixes
719

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ npm install github-api
2828

2929
## Compatibility
3030
Github.js is tested on Node:
31+
* 6.x
3132
* 5.x
3233
* 4.x
3334
* 0.12
34-
* 0.10
3535

3636
## GitHub Tools
3737

@@ -47,11 +47,11 @@ as well. In the meantime, we recommend you to take a look at other projects of t
4747
or using a new promise-based API. For now the promise-based API just returns the
4848
raw HTTP request promise; this might change in the next version.
4949
*/
50-
var GitHub = require('github-api');
50+
import GitHub from 'github-api';
5151

5252
// unauthenticated client
53-
var gh = new GitHub();
54-
var gist = gh.getGist(); // not a gist yet
53+
const gh = new GitHub();
54+
let gist = gh.getGist(); // not a gist yet
5555
gist.create({
5656
public: true,
5757
description: 'My first gist',
@@ -60,37 +60,37 @@ gist.create({
6060
contents: "Aren't gists great!"
6161
}
6262
}
63-
}).then(function(httpResponse) {
63+
}).then(function({data}) {
6464
// Promises!
65-
var gist = httpResponse.data;
65+
let gistJson = data;
6666
gist.read(function(err, gist, xhr) {
6767
// if no error occurred then err == null
6868

69-
// gist == httpResponse.data
69+
// gistJson === httpResponse.data
7070

71-
// xhr == httpResponse
71+
// xhr === httpResponse
7272
});
7373
});
7474
```
7575

7676
```javascript
77-
var GitHub = require('github-api');
77+
import GitHub from 'github-api';
7878

7979
// basic auth
80-
var gh = new GitHub({
80+
const gh = new GitHub({
8181
username: 'FOO',
8282
password: 'NotFoo'
8383
});
8484

85-
var me = gh.getUser();
86-
me.getNotification(function(err, notifcations) {
85+
const me = gh.getUser();
86+
me.listNotifications(function(err, notifcations) {
8787
// do some stuff
8888
});
8989

90-
var clayreimann = gh.getUser('clayreimann');
90+
const clayreimann = gh.getUser('clayreimann');
9191
clayreimann.getStarredRepos()
92-
.then(function(httpPromise) {
93-
var repos = httpPromise.data;
92+
.then(function({data: reposJson}) {
93+
// do stuff with reposJson
9494
});
9595
```
9696

0 commit comments

Comments
 (0)