Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/harborn-digital/tulip-api-client

PHP client library for communicating with the Tulip API.
https://github.com/harborn-digital/tulip-api-client

Last synced: about 1 month ago
JSON representation

PHP client library for communicating with the Tulip API.

Awesome Lists containing this project

README

        

# Tulip API client

[![Latest version on Packagist][ico-version]][link-version]
[![Software License][ico-license]][link-license]
[![Scrutinizer Code Quality][ico-quality]][link-quality]
[![Build Status][ico-build]][link-build]
[![Code Coverage][ico-coverage]][link-coverage]

PHP client library for communicating with the Tulip API.

## Installation using Composer

Run the following command to add the package to the composer.json of your project:

``` bash
$ composer require connectholland/tulip-api-client
```

#### Versioning
This library uses [Semantic Versioning 2](http://semver.org/) for new versions.

## Usage

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
callService('contact', 'detail', array('id' => 1));

```

#### Inserting an object

```php
callService('contact', 'save', array(
'firstname' => 'John',
'lastname' => 'Doe',
'email' => '[email protected]',
));

```

#### Updating an object

```php
callService('contact', 'save', array(
'id' => 1,
'firstname' => 'Jane',
'lastname' => 'Doe',
'email' => '[email protected]',
));

```

#### Uploading a file when inserting / updating an object

```php
callService('contact', 'save',
array(
'id' => 1,
'firstname' => 'Jane',
'lastname' => 'Doe',
'email' => '[email protected]',
),
array(
'photo' => fopen('/path/to/files/photo.jpg', 'r'),
)
);

```

## Credits

- [Niels Nijens][link-author]

Also see the list of [contributors][link-contributors] who participated in this project.

## License

This library is licensed under the MIT License. Please see the [LICENSE file](LICENSE.md) for details.

[ico-version]: https://img.shields.io/packagist/v/connectholland/tulip-api-client.svg
[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg
[ico-build]: https://scrutinizer-ci.com/g/ConnectHolland/tulip-api-client/badges/build.png?b=master
[ico-coverage]: https://scrutinizer-ci.com/g/ConnectHolland/tulip-api-client/badges/coverage.png?b=master
[ico-quality]: https://scrutinizer-ci.com/g/ConnectHolland/tulip-api-client/badges/quality-score.png?b=master

[link-version]: https://packagist.org/packages/connectholland/tulip-api-client
[link-license]: LICENSE.md
[link-build]: https://scrutinizer-ci.com/g/ConnectHolland/tulip-api-client/build-status/master
[link-coverage]: https://scrutinizer-ci.com/g/ConnectHolland/tulip-api-client/?branch=master
[link-quality]: https://scrutinizer-ci.com/g/ConnectHolland/tulip-api-client/?branch=master
[link-author]: https://github.com/niels-nijens
[link-contributors]: https://github.com/ConnectHolland/tulip-api-client/contributors