Skip to content

Shaygan/RecommenderIrBundle

Repository files navigation

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages