baconmanager/rd-station-bundle

This bundle of symfony2

Installs: 937

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 4

Forks: 1

Open Issues: 0

Type:symfony-bundle

dev-master 2020-01-20 16:51 UTC

This package is not auto-updated.

Last update: 2024-04-27 16:31:22 UTC


README

Codacy Badge Latest Stable Version License SensioLabsInsight

Este bundle é responsável por gerar a integração com a API do RD Station

Instalação

Para instalar o bundle basta rodar o seguinte comando abaixo:

$ composer require baconmanager/rd-station-bundles

Agora adicione os seguintes bundles no arquivo AppKernel.php:

<?php
// app/AppKernel.php
public function registerBundles()
{
    // ...
    new Bacon\Bundle\CoreBundle\BaconRDStationBundle(),
    // ...
}

No arquivo app/config/config.yml adicione as seguintes configurações:

bacon_rd_station:
    api:
        private_token: ...
        token: ...

Utilizando a api

Cadastrando e alterando um lead

<?php
// src/AppBundle/Controller/DefaultController.php
public function rdStationAction()
{
    $api = $this->container->get('bacon_rd_station.api');

    $return = $api->api('conversions','POST',array(
        'email' => 'teste@gmail.com',
        'nome'  => 'Lead'
    ));
}