{"id":20874970,"url":"https://github.com/servicestack/gistcafe-php","last_synced_at":"2025-03-12T16:16:01.898Z","repository":{"id":57048328,"uuid":"333328346","full_name":"ServiceStack/gistcafe-php","owner":"ServiceStack","description":"gist.cafe utils for PHP","archived":false,"fork":false,"pushed_at":"2021-01-27T08:20:59.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-09T22:07:07.589Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ServiceStack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-27T06:41:10.000Z","updated_at":"2021-01-27T08:21:01.000Z","dependencies_parsed_at":"2022-08-23T18:51:02.307Z","dependency_job_id":null,"html_url":"https://github.com/ServiceStack/gistcafe-php","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ServiceStack%2Fgistcafe-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ServiceStack%2Fgistcafe-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ServiceStack%2Fgistcafe-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ServiceStack%2Fgistcafe-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ServiceStack","download_url":"https://codeload.github.com/ServiceStack/gistcafe-php/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243249011,"owners_count":20260768,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-18T06:40:34.444Z","updated_at":"2025-03-12T16:16:01.878Z","avatar_url":"https://github.com/ServiceStack.png","language":"PHP","readme":"Useful [gist.cafe](https://gist.cafe) utils for PHP Apps.\n\n## Usage\n\nSimple Usage Example:\n\n```php\nrequire __DIR__ . '/vendor/autoload.php';\n\nuse gistcafe\\Inspect;\n\n$orgName = \"php\";\n\n$opts = [\n    \"http\" =\u003e [\n        \"header\" =\u003e \"User-Agent: gist.cafe\\r\\n\"\n    ]\n];\n$context = stream_context_create($opts);\n$json = file_get_contents(\"https://api.github.com/orgs/{$orgName}/repos\", false, $context);\n$orgRepos = array_map(function($x) {\n    $x = get_object_vars($x);\n    return [\n        \"name\"        =\u003e $x[\"name\"],\n        \"description\" =\u003e $x[\"description\"],\n        \"url\"         =\u003e $x[\"url\"],\n        \"lang\"        =\u003e $x[\"language\"],\n        \"watchers\"    =\u003e $x[\"watchers\"],\n        \"forks\"       =\u003e $x[\"forks\"],\n    ]; \n}, json_decode($json));\nusort($orgRepos, function($a,$b) { return $b[\"watchers\"] - $a[\"watchers\"]; });\n\necho  \"Top 3 {$orgName} GitHub Repos:\\n\";\nInspect::printDump(array_slice($orgRepos, 0, 3));\n\necho  \"\\nTop 10 {$orgName} GitHub Repos:\\n\";\nInspect::printDumpTable(array_map(function($x) {\n    return [\n        \"name\"        =\u003e $x[\"name\"],\n        \"lang\"        =\u003e $x[\"lang\"],\n        \"watchers\"    =\u003e $x[\"watchers\"],\n        \"forks\"       =\u003e $x[\"forks\"],\n    ]; \n}, array_slice($orgRepos, 0, 10)));\n```\n\nWhich outputs:\n\n```\nTop 3 php GitHub Repos:\n[\n    {\n        name: php-src,\n        description: The PHP Interpreter,\n        url: https://api.github.com/repos/php/php-src,\n        lang: C,\n        watchers: 29300,\n        forks: 6484\n    },\n    {\n        name: web-php,\n        description: The www.php.net site,\n        url: https://api.github.com/repos/php/web-php,\n        lang: PHP,\n        watchers: 565,\n        forks: 344\n    },\n    {\n        name: php-gtk-src,\n        description: The PHP GTK Bindings,\n        url: https://api.github.com/repos/php/php-gtk-src,\n        lang: C++,\n        watchers: 192,\n        forks: 48\n    }\n]\n\nTop 10 php GitHub Repos:\n+------------------------------------------------+\n|      name      |    lang    | watchers | forks |\n|------------------------------------------------|\n| php-src        | C          |    29300 |  6484 |\n| web-php        | PHP        |      565 |   344 |\n| php-gtk-src    | C++        |      192 |    48 |\n| web-qa         | PHP        |       61 |    32 |\n| phd            | PHP        |       55 |    25 |\n| web-bugs       | PHP        |       45 |    55 |\n| web-doc-editor | JavaScript |       42 |    29 |\n| presentations  | HTML       |       42 |    19 |\n| web-wiki       | PHP        |       31 |    19 |\n| systems        | C          |       26 |    11 |\n+------------------------------------------------+\n```\n\n## Features and bugs\n\nPlease file feature requests and bugs to the [issue tracker](https://github.com/ServiceStack/gistcafe-php/issues).","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fservicestack%2Fgistcafe-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fservicestack%2Fgistcafe-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fservicestack%2Fgistcafe-php/lists"}