connectholland/tulip-api-client
PHP client for the Tulip API, providing a simple way to authenticate and call Tulip endpoints from Laravel or any PHP app. Wraps requests and responses to help you integrate with Tulip services with minimal boilerplate.
PHP client library for communicating with the Tulip API.
Run the following command to add the package to the composer.json of your project:
$ composer require connectholland/tulip-api-client
This library uses Semantic Versioning 2 for new versions.
Below are some common usage examples for the API client. For more information, please see the Tulip API documentation that is supplied when you want to integrate with the Tulip CRM software.
<?php
$client = new ConnectHolland\TulipAPI\Client('https://api.example.com', '1.1');
// Calls https://api.example.com/api/1.1/contact/detail with id=1
$response = $client->callService('contact', 'detail', array('id' => 1));
<?php
$client = new ConnectHolland\TulipAPI\Client('https://api.example.com', '1.1');
// Calls https://api.example.com/api/1.1/contact/save
$response = $client->callService('contact', 'save', array(
'firstname' => 'John',
'lastname' => 'Doe',
'email' => 'johndoe@gmail.com',
));
<?php
$client = new ConnectHolland\TulipAPI\Client('https://api.example.com', '1.1');
// Calls https://api.example.com/api/1.1/contact/save
$response = $client->callService('contact', 'save', array(
'id' => 1,
'firstname' => 'Jane',
'lastname' => 'Doe',
'email' => 'janedoe@gmail.com',
));
<?php
$client = new ConnectHolland\TulipAPI\Client('https://api.example.com', '1.1');
// Calls https://api.example.com/api/1.1/contact/save
$response = $client->callService('contact', 'save',
array(
'id' => 1,
'firstname' => 'Jane',
'lastname' => 'Doe',
'email' => 'janedoe@gmail.com',
),
array(
'photo' => fopen('/path/to/files/photo.jpg', 'r'),
)
);
Also see the list of contributors who participated in this project.
This library is licensed under the MIT License. Please see the LICENSE file for details.
How can I help you explore Laravel packages today?