audiens/adobe-client

This package's canonical repository appears to be gone and the package has been frozen as a result.

0.3.0 2019-02-05 15:56 UTC

This package is auto-updated.

Last update: 2023-01-29 02:46:43 UTC


README

Build Status Scrutinizer Code Quality Code Climate Coverage Status

An OOP implementation af the Adobe API.

Installation

To use this package, use composer:

  • from CLI: composer require Audiens/adobe-client
  • or, directly in your composer.json:
{
    "require": {
        "Audiens/adobe-client": "dev-master"
    }
}

Features

At this stage, adobe client implements these three method:

  • FindAll: method that retrieves all your traits from adobe
  • findOneById: Retrieve a specified trait by SID param
  • getTrendByTrait: Retrieve the trends report for a specific trait and for a date range

Usage

require 'vendor/autoload.php';

$client_id = '{your_client_id'}'
$secret_key = '{your_secret_key'}'
$username = '{yourUsername}';
$password = '{yourPassword}';

$cache = $cacheToken ? new FilesystemCache('build') : null;
$client = new Client();
$authStrategy = new AdnxStrategy(new Client(), $cache);

$authClient = new Auth($client_id, $secret_key, $username, $password, $client, $authStrategy);

$traitRepository = new TraitRepository($authClient);

$myTraits = $traitRepository->findAll();

Test

Functional and unit tests are located under the "Test" folder. Be aware that the functional test require that you adobe sandbox enviroment contains at least one trait.

License

This project is released under Apache License Version 2.0. See license file for more detailed information.