alexjustesen / laravel-openbrewerydb-api

This pacakge provides an easy connection to the Open Brewery DB project for PHP and Laravel applications.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Laravel Openbrewerydb API

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This pacakge provides an easy connection to the Open Brewery DB 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:

composer require alexjustesen/laravel-openbrewerydb-api

You can publish the config file with:

php artisan vendor:publish --tag="laravel-openbrewerydb-api-config"

Usage

Auto Complete Search for Breweries

use AlexJustesen\OpenbrewerydbApi\OpenbrewerydbApi;

$request = OpenbrewerydbApi::autoComplete('broad');

$response = $request->json();

Get a Brewery

use AlexJustesen\OpenbrewerydbApi\OpenbrewerydbApi;

$request = OpenbrewerydbApi::get('broad-brook-brewing-company-suffield');

$response = $request->json();

List Breweries

use AlexJustesen\OpenbrewerydbApi\OpenbrewerydbApi;

$request = OpenbrewerydbApi::list();

$response = $request->json();

Search for Breweries

use AlexJustesen\OpenbrewerydbApi\OpenbrewerydbApi;

$request = $request = OpenbrewerydbApi::search('broad');

$response = $request->json();

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

About

This pacakge provides an easy connection to the Open Brewery DB project for PHP and Laravel applications.

License:MIT License


Languages

Language:PHP 100.0%