Marello Api Extension
Marello Api extension is a wrapper which enables the applications to communicate with an
instance of Marello. This wrapper only provides authentication with X-WSSE headers and allows you to send or get data from a Marello Application instance., (*1)
The extension is based on the work Sylvain Rayé has done back in 2014, where he explains how to connect to an OroCRM/Akeneo instance with this method.
The extension uses a lot of work done by Sylvain Rayé regarding the X-WSSe authentication but adds a Client into it to make the create and send the calls to an instance.
The original post can found on Sylvain Rayé's blog.
Oro's cookbook now includes an instruction on how to generate the X-WSSE in an Oro based platform, (*2)
Features
- Pinging the Marello instance (\Marello\Api\Client::pingInstance());
- Getting data from Marello, including page/limit filter;
- Sending data to Marello with POST/PUT/DELETE requests
Future Features
- Disable denpendency from Marello Bridge on this wrapper for swapping out this wrapper for, for example GuzzleHttp, (*3)
Requirements
- PHP 5.5.0 or above with command line interface
Installation instructions
In order to get the Bridge Api, you can easily install this through composer. If you don't have composer installed globally, you can get it by running the following command:, (*4)
curl -s https://getcomposer.org/installer | php
php composer.phar require "marellocommerce/marello-bridge-api"
- Install dependencies with composer. If installation process seems too slow you can use
--prefer-dist
option.
php composer.phar install --prefer-dist --no-dev
Running Tests
In order to run the tests for the Marello Bridge API, you need to update the dependencies with composer by running the following command:, (*5)
php composer.phar update
Or do a fresh install, (*6)
php composer.phar install --prefer-dist
- To run the tests you need to run the following command in the
vendor/marellocommerce/marello-bridge-api
directory
vendor/phpunit/phpunit/phpunit --testsuite="Marello Api Test Suite"
or if you have phpunit
installed globally:, (*7)
phpunit --testsuite="Marello Api Test Suite"
Usage
for usage see docs/USAGE.md, (*8)
Questions? Problems? Improvements?, (*9)
Feel free to contact us either through http://www.marello.com/contact/, forum http://www.marello.com/forum/marello/ or open an issue in the repository :) Thanks!, (*10)