dbx12/yii2-closeio

An extension to connect your closeio / close.com leads to your application

Installs: 0

Dependents: 0

Suggesters: 0

Security: 0

Type:yii2-extension

1.0.0 2020-09-16 06:15 UTC

This package is not auto-updated.

Last update: 2024-04-11 22:59:04 UTC


README

Connect you Yii2 application with the Close CRM (previously Close.io) API. This project wraps loopline-systems/closeio-api-wrapper in a Yii2 component.

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist dbx12/yii2-closeio "*"

or add

"dbx12/yii2-closeio": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, configure it as component in your config files. You will need an API key for your close organization. Read more about API keys and how to get them in the close documentation here.

return [
    'components' => [
        'close' => [
            'class' => \dbx12\closeio\CloseComponent::class,
            'apiKey' => 'api-key-here'
        ],
    ],
];

You can than use it as component, for example, if you want to find the lead lead_aaaaaaaabbbbbbbcccccccdddddddeeeeeeefffffff you could use this snippet to get a LooplineSystems\CloseIoApiWrapper\Model\Lead object.

$shipment = Yii::$app->close->leadApi->getLead('lead_aaaaaaaabbbbbbbcccccccdddddddeeeeeeefffffff');

You can read how to use the different APIs in the documentation of the actual API project here