redcode/linkedin-api

A PHP implementation of the LinkedIn API with caching ability

0.1.0 2014-12-10 19:11 UTC

This package is not auto-updated.

Last update: 2024-11-19 17:10:13 UTC


README

This library implements ability of caching all requests to LinkedIn API.

Installation

  • Add to you composer.json file the line:
"redcode/linkedin-api": "*",
  • Update composer with command:
composer update redcode/linkedin-api

Usage

// lifeTime of cache in seconds
$lifeTimeInSeconds  = 60 * 60;

// any writable dir
$cacheDir           = '',

$api = new RedCode\LinkedIn\LinkedIn([
       'api_key'       => '',
       'api_secret'    => '',
       'callback_url'  => ''
    ],
    new Cache\FilesystemCache($cacheDir),
    $lifeTimeInSeconds
);