No description, website, or topics provided.
PHP
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
DependencyInjection
Resources/config
LICENSE.md
README.md
Recommender.php
ShayganRecommenderIrBundle.php
composer.json

README.md

ShayganRecommenderIrBundle

A symfony2 wrapper bundle for Recommender.ir.

Install

Via Composer

$ composer require shaygan/recommender-ir-bundle @dev

Edit your app/AppKernel.php to register the bundle in the registerBundles() method as above:

class AppKernel extends Kernel
{

    public function registerBundles()
    {
        $bundles = array(
            // ...
            // register the bundle here
            new \Shaygan\RecommenderIrBundle\ShayganRecommenderIrBundle()
        );
    }
}

Configure the bundle

This bundle was designed to just work out of the box.

# app/config/config.yml

shaygan_recommender:
    base_uri: http://example.com
    #user_agent: shaygan-recommender-ir (https://github.com/shaygan/recommenderir) 
    #connect_timeout: 30
    #timeout: 30

Usage

Wherever you have access to the service container :

<?php
    // get the api as a service
    $api = $this->container->get('shaygan.recommender');

    // test the API by calling getMe method
    $user = $api->getMe();

?>

License

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