Skip to content

Commit

Permalink
Add note about moved repositories
Browse files Browse the repository at this point in the history
  • Loading branch information
cursedcoder committed May 22, 2015
1 parent 4f3a34d commit ee45d48
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions doc/repos.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,3 +238,14 @@ $activity = $client->api('repo')->activity('ornicar', 'php-github-api');
```

Returns an array of commit activity group by week.

### `Moved` repositories
Github repositories can be moved to another org/user, but it remains the `id`.
In case if you can't no more find repo, you can retrieve it by `id`:

```php
use Github\HttpClient\Message\ResponseMediator;

$data = $client->getHttpClient()->get('/repositories/24560307');
$repo = ResponseMediator::getContent($data);
```

0 comments on commit ee45d48

Please sign in to comment.