Provides integration of the crowdvalley/crowdentials-api-wrapper library into
the Symfony2 framework.
First, add it to the list of dependencies inside your composer.json:
{
"require": {
"crowdvalley/crowdentials-api-wrapper-bundle": "dev-master"
}
}Then simply install it with composer:
$> composer update crowdvalley/crowdentials-api-wrapper-bundleEnable the bundle in the kernel:
<?php
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new Crowdvalley\CrowdentialsApiWrapperBundle\CrowdvalleyCrowdentialsApiWrapperBundle(),
);
}Add the following configuration to your config.yml file.
# app/config/config.yml
crowdvalley_crowdentials_api_wrapper:
# Your private api key
api_key: 'your-key'
# The base url
base_url: 'http://sandbox.crowdentials.com/cai/api/v2'Now you have access to the service crowdentials_api:
/** @var \Crowdvalley\Crowdentials\Api\Accreditation\Wrapper $api */
$api = $this->getContainer()->get('crowdentials_api');You can read more about the api wrapper here.