2017 © Pedro Peláez
 

library bigoven-php

A PHP client library for the BigOven API

image

cpliakas/bigoven-php

A PHP client library for the BigOven API

  • Monday, January 6, 2014
  • by cpliakas
  • Repository
  • 1 Watchers
  • 2 Stars
  • 8 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 3 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

BigOven API Client for PHP

Build Status Coverage Status Total Downloads Latest Stable Version, (*1)

A PHP client library for the BigOven API., (*2)

Installation

BigOven API Client for PHP can be installed with Composer by adding it as a dependency to your project's composer.json file., (*3)

{
    "require": {
        "cpliakas/bigoven-php": "*"
    }
}

Please refer to Composer's documentation for more detailed installation and usage instructions., (*4)

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');

The Versions