Skip to content

Commit b1e6d86

Browse files
committed
Updated API docs.
1 parent 460d5bf commit b1e6d86

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,37 @@ var github = new Github({
3030
var repo = github.getRepo(username, reponame);
3131
```
3232

33+
Show repository information
34+
35+
```js
36+
repo.show(function(err, repo) {});
37+
```
38+
39+
Get contents at a particular path.
40+
41+
```js
42+
repo.contents("path/to/dir", function(err, contents) {});
43+
```
44+
45+
Fork repository. This operation runs asynchronously. You may want to poll for `repo.contents` until the forked repo is ready.
46+
47+
```js
48+
repo.fork(function(err) {});
49+
```
50+
51+
Create Pull Request.
52+
53+
```js
54+
var pull = {
55+
title: message,
56+
body: "This pull request has been automatically generated by Prose.io.",
57+
base: "gh-pages",
58+
head: "michael" + ":" + "prose-patch",
59+
};
60+
repo.createPullRequest(pull, function(err, pullRequest) {});
61+
```
62+
63+
3364
Retrieve all available branches (aka heads) of a repository.
3465

3566
```js

0 commit comments

Comments
 (0)