{"id":15019107,"url":"https://github.com/php-api-clients/pi-hole","last_synced_at":"2025-07-14T04:05:02.347Z","repository":{"id":56961217,"uuid":"101336934","full_name":"php-api-clients/pi-hole","owner":"php-api-clients","description":":strawberry: Pi-Hole client","archived":false,"fork":false,"pushed_at":"2023-12-15T05:09:33.000Z","size":43,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-29T22:36:33.466Z","etag":null,"topics":["api","api-client","hacktoberfest","php","php7","pi-hole","pi-hole-client","reactphp"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/php-api-clients.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-08-24T20:54:18.000Z","updated_at":"2022-02-12T14:23:17.000Z","dependencies_parsed_at":"2023-12-15T06:26:43.182Z","dependency_job_id":"9dfcf76a-3c58-4f65-b2bc-2aeed7a02120","html_url":"https://github.com/php-api-clients/pi-hole","commit_stats":{"total_commits":8,"total_committers":1,"mean_commits":8.0,"dds":0.0,"last_synced_commit":"0b598059c324a28963e3665615425d686c8fcd88"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/php-api-clients/pi-hole","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-api-clients%2Fpi-hole","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-api-clients%2Fpi-hole/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-api-clients%2Fpi-hole/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-api-clients%2Fpi-hole/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/php-api-clients","download_url":"https://codeload.github.com/php-api-clients/pi-hole/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-api-clients%2Fpi-hole/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265238324,"owners_count":23732605,"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":["api","api-client","hacktoberfest","php","php7","pi-hole","pi-hole-client","reactphp"],"created_at":"2024-09-24T19:52:59.825Z","updated_at":"2025-07-14T04:05:02.305Z","avatar_url":"https://github.com/php-api-clients.png","language":"PHP","readme":"# Async first Pi-Hole API Client for PHP 7\n\n[![Build Status](https://travis-ci.org/php-api-clients/pi-hole.svg?branch=master)](https://travis-ci.org/php-api-clients/pi-hole)\n[![Latest Stable Version](https://poser.pugx.org/api-clients/pi-hole/v/stable.png)](https://packagist.org/packages/api-clients/pi-hole)\n[![Total Downloads](https://poser.pugx.org/api-clients/pi-hole/downloads.png)](https://packagist.org/packages/api-clients/pi-hole)\n[![Code Coverage](https://scrutinizer-ci.com/g/php-api-clients/pi-hole/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/php-api-clients/pi-hole/?branch=master)\n[![License](https://poser.pugx.org/api-clients/pi-hole/license.png)](https://packagist.org/packages/api-clients/pi-hole)\n[![PHP 7 ready](http://php7ready.timesplinter.ch/php-api-clients/pi-hole/badge.svg)](https://pi-hole-ci.org/php-api-clients/pi-hole)\n\n# Install\n\nTo install via [Composer](http://getcomposer.org/), use the command below, it will automatically detect the latest version and bind it with `^`.\n\n```\ncomposer require api-clients/pi-hole\n```\n\n# Usage\n\nThe client needs two things, the ReactPHP event loop, and your PI Hole's hostname. Once you created the client you can call the `overview` method to get to stats as shown on the dashboard.\n\n```php\nuse ApiClients\\Client\\PiHole\\AsyncClient;\nuse ApiClients\\Client\\PiHole\\Resource\\OverviewInterface;\nuse React\\EventLoop\\Factory;\nuse function ApiClients\\Foundation\\resource_pretty_print;\n\nrequire dirname(__DIR__) . DIRECTORY_SEPARATOR . 'vendor/autoload.php';\n\n$loop = Factory::create();\n$client = AsyncClient::create($loop, 'pi-hole.local');\n\n$client-\u003eoverview()-\u003edone(function (OverviewInterface $overview) {\n    resource_pretty_print($overview);\n});\n\n$loop-\u003erun();\n```\n\n# Examples\n\nThe [`examples`](https://github.com/php-api-clients/pi-hole/tree/master/examples) directory is filled with all kinds of examples for this package.\n\n# License\n\nThe MIT License (MIT)\n\nCopyright (c) 2017 Cees-Jan Kiewiet\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphp-api-clients%2Fpi-hole","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphp-api-clients%2Fpi-hole","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphp-api-clients%2Fpi-hole/lists"}