{"id":20134882,"url":"https://github.com/joeymckenzie/openbrewerydb-php-client","last_synced_at":"2025-08-14T07:43:17.367Z","repository":{"id":218805415,"uuid":"747020718","full_name":"JoeyMckenzie/openbrewerydb-php-client","owner":"JoeyMckenzie","description":"🍺 An Open Brewery DB API client for PHP.","archived":false,"fork":false,"pushed_at":"2024-04-25T17:30:34.000Z","size":32177,"stargazers_count":19,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-29T19:40:43.751Z","etag":null,"topics":["beer","openbrewerydb","php"],"latest_commit_sha":null,"homepage":"https://openbrewerydb.org/","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/JoeyMckenzie.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-MIT","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":"2024-01-23T05:16:46.000Z","updated_at":"2025-07-07T15:20:27.000Z","dependencies_parsed_at":"2024-02-28T00:27:07.201Z","dependency_job_id":"9e97622f-db0d-4582-b007-269e8821b29e","html_url":"https://github.com/JoeyMckenzie/openbrewerydb-php-client","commit_stats":null,"previous_names":["joeymckenzie/openbrewerydb-php-api","joeymckenzie/openbrewerydb-php-client"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/JoeyMckenzie/openbrewerydb-php-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoeyMckenzie%2Fopenbrewerydb-php-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoeyMckenzie%2Fopenbrewerydb-php-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoeyMckenzie%2Fopenbrewerydb-php-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoeyMckenzie%2Fopenbrewerydb-php-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JoeyMckenzie","download_url":"https://codeload.github.com/JoeyMckenzie/openbrewerydb-php-client/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoeyMckenzie%2Fopenbrewerydb-php-client/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270385016,"owners_count":24574537,"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","status":"online","status_checked_at":"2025-08-14T02:00:10.309Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["beer","openbrewerydb","php"],"created_at":"2024-11-13T21:12:26.818Z","updated_at":"2025-08-14T07:43:17.342Z","avatar_url":"https://github.com/JoeyMckenzie.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Logo](./assets/obdb.png)\n\n\u003cdiv align=\"center\"\u003e\n  \u003cdiv style=\"display: inline-block;\"\u003e\n    \u003cimg src=\"https://github.com/JoeyMckenzie/openbrewerydb-php-api/actions/workflows/ci.yml/badge.svg\" /\u003e\n    \u003cimg src=\"https://github.styleci.io/repos/747020718/shield?style=flat\"/\u003e\n  \u003c/div\u003e\n\u003c/div\u003e\n\n(Un)official PHP bindings for the [Open Brewery DB API](https://openbrewerydb.org/). Open Brewery DB provides a public\ndataset for breweries around the world, as well as offering an API to retrieve data in various forms. This library aims to\nprovide straight and easy-to-use PHP bindings for querying the API. The library is inspired by the [Open AI client for PHP](https://github.com/openai-php/client) - please give it star as well!\n\n To get started, first install the package with composer:\n\n```shell\n$ composer require joeymckenzie/openbrewerydb-php-client\n```\n\nNext, spin up a new client within your code and fire away!\n\n```php\n\u003c?php\n\ndeclare(strict_types=1);\n\nrequire_once __DIR__.'/../vendor/autoload.php';\n\nuse OpenBreweryDb\\OpenBreweryDb;\n\n$client = OpenBreweryDb::client();\n\n// Get a list of breweries, based on all types of different search criteria\n$breweries = $client-\u003ebreweries()-\u003elist([\n    'by_city' =\u003e 'Sacramento',\n]);\nvar_dump($breweries);\n\n// Retrieve various metadata about breweries from the API\n$metadata = $client-\u003ebreweries()-\u003emetadata();\nvar_dump($metadata);\n\n// Get a random brewery with a specified page size\n$randomBrewery = $client-\u003ebreweries()-\u003erandom(5);\nvar_dump($randomBrewery);\n```\n\nThe library relies on autodiscovery and will use whichever package that implements PSR-17 within your composer\ndependencies. You are free to use the HTTP client of you choice, though a popular package\nis [Guzzle](https://docs.guzzlephp.org/en/stable/).\n\nThough I am not affiliated with organization itself, check out the entire set of APIs offered by Open Brewery DB, check\nout the docs on their [website](https://openbrewerydb.org/documentation).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoeymckenzie%2Fopenbrewerydb-php-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoeymckenzie%2Fopenbrewerydb-php-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoeymckenzie%2Fopenbrewerydb-php-client/lists"}