cpliakas / bigoven-php
This package is abandoned and no longer maintained.
No replacement package was suggested.
A PHP client library for the BigOven API
dev-master
2014-01-06 14:57 UTC
Requires
- php: >=5.3.0
- guzzle/guzzle: ~3.0
Requires (Dev)
- pdepend/pdepend: ~1.0
- phploc/phploc: ~2.0
- phpmd/phpmd: ~1.0
- phpunit/phpunit: ~3.0
- satooshi/php-coveralls: *
- sebastian/phpcpd: ~2.0
This package is not auto-updated.
Last update: 2020-01-20 03:44:44 UTC
README
A PHP client library for the BigOven API.
Installation
BigOven API Client for PHP can be installed with Composer by adding it as a dependency to your project's composer.json file.
{ "require": { "cpliakas/bigoven-php": "*" } }
Please refer to Composer's documentation for more detailed installation and usage instructions.
Usage
require 'vendor/autoload.php'; // Instantiate the client class that consumes the API. $bigOven = \BigOven\BigOvenClient::factory(array( 'api_key' => 'my-api-key', 'username' => 'my-username', 'password' => 'my-password', )); // Get a recipe by ID and display the title. $recipe = $bigOven->getRecipe('12345'); echo $recipe->title() . PHP_EOL; // List the ingredients. echo 'Ingredients: ' . PHP_EOL; foreach ($recipe as $ingredient) { echo $ingredient->name() . PHP_EOL; } // Show the user who posted the recipe. echo 'Posted by: ' . $recipe->poster()->userName() . PHP_EOL; // Get a list of recipes that have "cheese" in the title. $recipes = $bigOven->findRecipesByTitle('cheese');