Skip to content
Newer
Older
100644 15 lines (10 sloc) 280 Bytes
9b8d645 @mikelietz Adding a simple script to grab all the names of the -extras repos.
mikelietz authored
1 <?php
2
3 $api_endpoint = 'https://api.github.com/';
4
44e2451 @mikelietz Since the v3 API doesn't seem to paginate like it says it does, thing…
mikelietz authored
5 $url = $api_endpoint . "orgs/habari-extras/repos";
9b8d645 @mikelietz Adding a simple script to grab all the names of the -extras repos.
mikelietz authored
6 $result = file_get_contents( $url );
44e2451 @mikelietz Since the v3 API doesn't seem to paginate like it says it does, thing…
mikelietz authored
7 $repos = json_decode ( $result );
9b8d645 @mikelietz Adding a simple script to grab all the names of the -extras repos.
mikelietz authored
8
44e2451 @mikelietz Since the v3 API doesn't seem to paginate like it says it does, thing…
mikelietz authored
9 $extras_repositories = array();
9b8d645 @mikelietz Adding a simple script to grab all the names of the -extras repos.
mikelietz authored
10
44e2451 @mikelietz Since the v3 API doesn't seem to paginate like it says it does, thing…
mikelietz authored
11 foreach( $repos as $repo ) {
12 $extras_repositories[] = $repo->name;
9b8d645 @mikelietz Adding a simple script to grab all the names of the -extras repos.
mikelietz authored
13 }
14 ?>
Something went wrong with that request. Please try again.