Welcome Guest, Not a member yet? Register   Sign In
How to use Composer installed libs?
#1

Hi,

i installed jlevers/selling-partner-api with composer.

Code:
require_once __DIR__ . '/vendor/autoload.php';

use SellingPartnerApi\Api;
use SellingPartnerApi\Configuration;
use SellingPartnerApi\Endpoint;

Does not work. Can someone tell me how to get it running?
Best regards,
Alex
Reply
#2

if you installed your codeigniter web with composer, then you should have a composer.json file at your web root and that if from the context of being at your web route from a shell window and you used :
Code:
composer require jlevers/selling-partner-api


then 2 things should have happened, you should have seen that your composer.json file has been updated snd now contains and entry for jlevers . Also that if you look
in your vendor directory you will also see a directory called something like jlevers.

In the process autoload would have been updated so in a controller , you don't need that line:

Code:
require_once __DIR__ . '/vendor/autoload.php';


normally with a class it would be instantiation

$handle = new Class ();

looking breifly at it, it says you need account and docs are :

https://github.com/jlevers/selling-partner-api
CMS CI4     I use Arch Linux by the way 

Reply
#3

thanks, it works an i got it runing Smile
Reply
#4

ok maybe you feedback on here what you are doing with it at a later date and its use
CMS CI4     I use Arch Linux by the way 

Reply




Theme © iAndrew 2016 - Forum software by © MyBB