zakirullin / pipedrive
Api client for pipedrive
v0.5.7beta
2017-04-04 09:14 UTC
Requires
- php: ~5.6
Requires (Dev)
- phpunit/phpunit: ~5.7
This package is auto-updated.
Last update: 2024-10-29 04:14:47 UTC
README
Installation
You can install the package via composer require
command:
$ composer require zakirullin/pipedrive
Usage
<?php require __DIR__ . '/../vendor/autoload.php'; use Zakirullin\Pipedrive\Pipedrive; $pipedrive = new Pipedrive('token'); // Get by id $organization = $pipedrive->organizations->findOne(1); // Create $id = $pipedrive->notes->create(['content' => 'Note']); // Update $pipedrive->persons->find(1)->update(['name' => 'New name']); // Find person with phone '777' for organization with name 'Github' $person = $pipedrive->organizations->find(['name' => 'Github'])->persons->findAll(['phone' => '777']); // Update all notes for matched organizations whole name is 'Github' $notes = $pipedrive->organizations->find(['name' => 'Github'])->notes; foreach ($notes as $note) { $note->content = 'Good news!'; $this->pipedrive->notes->update($note); }