izziaraffaele/affilinet-php

There is no license information available for the latest version (0.0.3) of this package.

A PHP client for Affilinet API

0.0.3 2016-03-07 07:30 UTC

This package is not auto-updated.

Last update: 2022-11-18 10:14:40 UTC


README

A very user-friendly PHP client for Affili.net.

Requirements:

  • PHP must be 5.5 or higher.

Instalation

Use Composer.

Install Composer Globally (Linux / Unix / OSX):

curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer

Run this Composer command to install the latest stable version of the client, in the current folder:

composer require izziaraffaele/affilinet-php

After installing, require Composer's autoloader and you're good to go:

<?php
require 'vendor/autoload.php';

Getting Started

// Create a client for Affilinet api
$client = new Affilinet\Client( $username, $password );

// Get the resource you need ( for now just statistics is available )
$statisticResource = $client->resource('statistics');

// Call methods of the api on the resource object
$response = $statisticResource->getSubIdStatistics( $parameters );

// check errors and get results
if( $response->hasErrors() )
{
    var_dump( $response->errors() );
}
else
{
    var_dump( $response->body() );
}

Docs

Please refer to the source code for now, while a proper documentation is made.