05/07
2017
Wallogit.com
2017 © Pedro Peláez
Akeneo Api wrapper for PHP
Connect easily to the Akeneo Api., (*1)
Compatible with Akeneo ^1.7, (*2)
You can install this library with composer:, (*3)
composer require every/akeneo-api
In orden to use any of the Akeneo endpoints, first you need to create a settings object with the akeneo host, username, password, client id and secret. You need to create the Auth and the Client, and pass the Client object to the endpoint object., (*4)
Below an example to get a product:, (*5)
<?php
require_once 'vendor/autoload.php';
use Every\Akeneo\Api;
use Every\Akeneo\Api\Endpoint;
$settings = new Api\Settings(
'http://akeneohost.com', // Akeneo Host
'myuser', // User Username
'mypass', // User Password
'myclientid', // Client ID
'mysecret' // Secret
);
$auth = new Api\Auth($settings);
$client = new Api\Client($auth);
$product = new Endpoint\Product($client);
var_dump($product->get('product_sku'));
For more information about the Akeneo Api see its docs., (*6)