Skip to content

panxzz/commissionjunction-php

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Commission Junction PHP API Library

Installation

Composer

Simply add the CommissionJunction API library to your composer.json file:

{
    "require": {
        "croscon/commissionjunction-php": "dev-master"
    }
}

Configuration

The API library simply needs your Commission Junction developer key (which can be obtained at https://api.cj.com/sign_up.cj).

<?php
$client = new \CROSCON\CommissionJunction\Client($api_key);

Usage

Commission Junction's API documentation can be found here.

The API library provides a generic api($subdomain, $resource, array $params = array(), $version = 'v2') method that accepts the subdomain, resource name, GET parameters, and optionally the api version number. When you view an individual REST service's documentation page, you will see a sample URI at the top of the page. The URI maps to the api(...) method as follows:

https://SUBDOMAIN.api.cj.com/VERSION/RESOURCE?PARAMS

Alternatively the library provides a few convenience methods for the major resources listed in the documentation:

<?php
$client->productSearch($parameters);
$client->linkSearch($parameters);
$client->publisherLookup($parameters);
$client->advertiserLookup($parameters);
$client->supportLookup($resource, $parameters);

Each method corresponds to the individual resource documentation pages found under the "REST APIs" section.

About

A Commission Junction PHP API Library

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%