Created
August 20, 2013 17:27
-
-
Save lyoshenka/6284521 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env php | |
<?php | |
$username = 'lyoshenka'; | |
$stars = file_get_contents('https://api.github.com/users/' . $username . '/starred?per_page=100'); | |
$stars = json_decode($stars, true); | |
//var_export($stars); | |
$languages = array(); | |
foreach($stars as $star) | |
{ | |
$languages[$star['language']][] = $star['full_name'] . ' - ' . $star['description']; | |
} | |
var_export($languages); | |
/* | |
array ( | |
'forks_count' => 38, | |
'milestones_url' => 'https://api.github.com/repos/ehynds/jquery-notify/milestones{/number}', | |
'downloads_url' => 'https://api.github.com/repos/ehynds/jquery-notify/downloads', | |
'contents_url' => 'https://api.github.com/repos/ehynds/jquery-notify/contents/{+path}', | |
'issue_events_url' => 'https://api.github.com/repos/ehynds/jquery-notify/issues/events{/number}', | |
'full_name' => 'ehynds/jquery-notify', | |
'trees_url' => 'https://api.github.com/repos/ehynds/jquery-notify/git/trees{/sha}', | |
'owner' => | |
array ( | |
'avatar_url' => 'https://secure.gravatar.com/avatar/57721d7c4df5a1e10e9442a79296956e?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png', | |
'login' => 'ehynds', | |
'organizations_url' => 'https://api.github.com/users/ehynds/orgs', | |
'events_url' => 'https://api.github.com/users/ehynds/events{/privacy}', | |
'followers_url' => 'https://api.github.com/users/ehynds/followers', | |
'following_url' => 'https://api.github.com/users/ehynds/following', | |
'repos_url' => 'https://api.github.com/users/ehynds/repos', | |
'subscriptions_url' => 'https://api.github.com/users/ehynds/subscriptions', | |
'starred_url' => 'https://api.github.com/users/ehynds/starred{/owner}{/repo}', | |
'url' => 'https://api.github.com/users/ehynds', | |
'received_events_url' => 'https://api.github.com/users/ehynds/received_events', | |
'gravatar_id' => '57721d7c4df5a1e10e9442a79296956e', | |
'id' => 130820, | |
'gists_url' => 'https://api.github.com/users/ehynds/gists{/gist_id}', | |
), | |
'homepage' => 'http://www.erichynds.com/jquery/a-jquery-ui-growl-ubuntu-notification-widget/', | |
'merges_url' => 'https://api.github.com/repos/ehynds/jquery-notify/merges', | |
'compare_url' => 'https://api.github.com/repos/ehynds/jquery-notify/compare/{base}...{head}', | |
'commits_url' => 'https://api.github.com/repos/ehynds/jquery-notify/commits{/sha}', | |
'assignees_url' => 'https://api.github.com/repos/ehynds/jquery-notify/assignees{/user}', | |
'events_url' => 'https://api.github.com/repos/ehynds/jquery-notify/events', | |
'open_issues_count' => 9, | |
'statuses_url' => 'https://api.github.com/repos/ehynds/jquery-notify/statuses/{sha}', | |
'tags_url' => 'https://api.github.com/repos/ehynds/jquery-notify/tags{/tag}', | |
'forks_url' => 'https://api.github.com/repos/ehynds/jquery-notify/forks', | |
'created_at' => '2010-05-11T22:22:01Z', | |
'svn_url' => 'https://github.com/ehynds/jquery-notify', | |
'has_issues' => true, | |
'mirror_url' => NULL, | |
'archive_url' => 'https://api.github.com/repos/ehynds/jquery-notify/{archive_format}{/ref}', | |
'branches_url' => 'https://api.github.com/repos/ehynds/jquery-notify/branches{/branch}', | |
'pushed_at' => '2011-11-26T23:15:09Z', | |
'has_downloads' => true, | |
'comments_url' => 'https://api.github.com/repos/ehynds/jquery-notify/comments{/number}', | |
'subscribers_url' => 'https://api.github.com/repos/ehynds/jquery-notify/subscribers', | |
'languages_url' => 'https://api.github.com/repos/ehynds/jquery-notify/languages', | |
'collaborators_url' => 'https://api.github.com/repos/ehynds/jquery-notify/collaborators{/collaborator}', | |
'description' => 'A growl/ubuntu-like notification system written on top of the UI widget factory', | |
'forks' => 38, | |
'ssh_url' => '[email protected]:ehynds/jquery-notify.git', | |
'pulls_url' => 'https://api.github.com/repos/ehynds/jquery-notify/pulls{/number}', | |
'stargazers_url' => 'https://api.github.com/repos/ehynds/jquery-notify/stargazers', | |
'blobs_url' => 'https://api.github.com/repos/ehynds/jquery-notify/git/blobs{/sha}', | |
'keys_url' => 'https://api.github.com/repos/ehynds/jquery-notify/keys{/key_id}', | |
'url' => 'https://api.github.com/repos/ehynds/jquery-notify', | |
'html_url' => 'https://github.com/ehynds/jquery-notify', | |
'watchers' => 423, | |
'size' => 168, | |
'issue_comment_url' => 'https://api.github.com/repos/ehynds/jquery-notify/issues/comments/{number}', | |
'subscription_url' => 'https://api.github.com/repos/ehynds/jquery-notify/subscription', | |
'contributors_url' => 'https://api.github.com/repos/ehynds/jquery-notify/contributors', | |
'teams_url' => 'https://api.github.com/repos/ehynds/jquery-notify/teams', | |
'fork' => false, | |
'git_url' => 'git://github.com/ehynds/jquery-notify.git', | |
'clone_url' => 'https://github.com/ehynds/jquery-notify.git', | |
'notifications_url' => 'https://api.github.com/repos/ehynds/jquery-notify/notifications{?since,all,participating}', | |
'git_tags_url' => 'https://api.github.com/repos/ehynds/jquery-notify/git/tags{/sha}', | |
'name' => 'jquery-notify', | |
'updated_at' => '2012-11-26T20:51:07Z', | |
'language' => 'JavaScript', | |
'has_wiki' => true, | |
'labels_url' => 'https://api.github.com/repos/ehynds/jquery-notify/labels{/name}', | |
'git_commits_url' => 'https://api.github.com/repos/ehynds/jquery-notify/git/commits{/sha}', | |
'hooks_url' => 'https://api.github.com/repos/ehynds/jquery-notify/hooks', | |
'private' => false, | |
'id' => 661644, | |
'open_issues' => 9, | |
'watchers_count' => 423, | |
'issues_url' => 'https://api.github.com/repos/ehynds/jquery-notify/issues{/number}', | |
'git_refs_url' => 'https://api.github.com/repos/ehynds/jquery-notify/git/refs{/sha}', | |
), | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment