https://github.com/alexjustesen/laravel-openbrewerydb-api
This pacakge provides an easy connection to the Open Brewery DB project for PHP and Laravel applications.
https://github.com/alexjustesen/laravel-openbrewerydb-api
api beer brewery database hacktoberfest laravel open php
Last synced: about 2 months ago
JSON representation
This pacakge provides an easy connection to the Open Brewery DB project for PHP and Laravel applications.
- Host: GitHub
- URL: https://github.com/alexjustesen/laravel-openbrewerydb-api
- Owner: alexjustesen
- License: mit
- Created: 2022-01-12T19:48:45.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-10-09T13:12:23.000Z (over 2 years ago)
- Last Synced: 2024-05-01T18:44:02.897Z (about 2 years ago)
- Topics: api, beer, brewery, database, hacktoberfest, laravel, open, php
- Language: PHP
- Homepage:
- Size: 55.7 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
- Security: .github/SECURITY.md
Awesome Lists containing this project
README
# Laravel Openbrewerydb API
[](https://packagist.org/packages/alexjustesen/laravel-openbrewerydb-api)
[](https://github.com/alexjustesen/laravel-openbrewerydb-api/actions?query=workflow%3Arun-tests+branch%3Amain)
[](https://github.com/alexjustesen/laravel-openbrewerydb-api/actions?query=workflow%3A"Check+%26+fix+styling"+branch%3Amain)
[](https://packagist.org/packages/alexjustesen/laravel-openbrewerydb-api)
This pacakge provides an easy connection to the [Open Brewery DB](https://www.openbrewerydb.org) project for PHP and Laravel applications.
## About Open Brewery DB
Open Brewery DB is a free dataset and API with public information on breweries, cideries, brewpubs, and bottleshops. The goal of Open Brewery DB is to maintain an open-source, community-driven dataset and provide a public API. It is our belief that public information should be freely accessible for the betterment of the beer community and the happiness of web developers and data analysts.
## Installation
You can install the package via composer:
```bash
composer require alexjustesen/laravel-openbrewerydb-api
```
You can publish the config file with:
```bash
php artisan vendor:publish --tag="laravel-openbrewerydb-api-config"
```
## Usage
### Auto Complete Search for Breweries
```php
use AlexJustesen\OpenbrewerydbApi\OpenbrewerydbApi;
$request = OpenbrewerydbApi::autoComplete('broad');
$response = $request->json();
```
### Get a Brewery
```php
use AlexJustesen\OpenbrewerydbApi\OpenbrewerydbApi;
$request = OpenbrewerydbApi::get('broad-brook-brewing-company-suffield');
$response = $request->json();
```
### List Breweries
```php
use AlexJustesen\OpenbrewerydbApi\OpenbrewerydbApi;
$request = OpenbrewerydbApi::list();
$response = $request->json();
```
### Search for Breweries
```php
use AlexJustesen\OpenbrewerydbApi\OpenbrewerydbApi;
$request = $request = OpenbrewerydbApi::search('broad');
$response = $request->json();
```
## Testing
```bash
composer test
```
## Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
## Contributing
Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.
## Security Vulnerabilities
Please review [our security policy](../../security/policy) on how to report security vulnerabilities.
## Credits
- [Alex Justesen](https://github.com/alexjustesen)
- [All Contributors](../../contributors)
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.