Skip to content

Commit 08e7c7c

Browse files
committed
Docs & a comment
1 parent 0005d74 commit 08e7c7c

File tree

3 files changed

+27
-1
lines changed

3 files changed

+27
-1
lines changed

doc/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ APIs:
1313
* [Pull Requests](pull_requests.md)
1414
* [Comments](pull_request/comments.md)
1515
* [Repositories](repos.md)
16+
* [Releases](repo/releases.md)
1617
* [Users](users.md)
1718

1819
Additional features:

doc/repo/releases.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
## Repo / Releases API
2+
[Back to the "Repos API"](../repos.md) | [Back to the navigation](../index.md)
3+
4+
This Github API Endpoint is currently undocumented because it's new, but works just fine.
5+
6+
7+
### List all releases
8+
9+
```php
10+
$releases = $client->api('repo')->releases()->all('twbs', 'bootstrap');
11+
```
12+
13+
### List one release
14+
15+
```php
16+
$release = $client->api('repo')->releases()->show('twbs', 'bootstrap', $id);
17+
```
18+
19+
### Remove a release
20+
21+
This works, but isn't thoroughly tested, use at your own risk.
22+
23+
```php
24+
$response = $client->api('repo')->releases()->remove('twbs', 'bootstrap', $id);
25+
```

lib/Github/Api/Repository/Releases.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function show($username, $repository, $id)
3737
}
3838

3939
/**
40-
* Delete a download in selected repository
40+
* Delete a download in selected repository (Not thoroughly tested!)
4141
*
4242
* @param string $username the user who owns the repo
4343
* @param string $repository the name of the repo

0 commit comments

Comments
 (0)