You are here

function socialfeed_libraries_info in Social Feed 7

Implements hook_libraries_info().

File

./socialfeed.module, line 35
Provide Facebook, Twitter and Instagram.

Code

function socialfeed_libraries_info() {
  $libraries = array();

  // This array key lets Libraries API search for
  // 'sites/all/libraries/socialfeed' directory, which should contain the
  // entire, original extracted library.
  $libraries['facebook'] = array(
    // Only used in administrative UI of Libraries API.
    'name' => 'PHP SDK for Facebook APIs',
    'vendor url' => 'http://developers.facebook.com/',
    'download url' => 'https://github.com/facebook/facebook-php-sdk-v4/archive/4.0-dev.zip',
    // Optional: If, after extraction, the actual library files are contained in
    // sites/all/libraries/socialfeed/src/Facebook,
    // specify the relative path here.
    'path' => 'src/Facebook',
    // Specify arguments for the version callback. By default,
    // libraries_get_version() takes a named argument array:
    'version arguments' => array(
      'file' => 'src/Facebook/FacebookRequest.php',
      'pattern' => "/const VERSION = '([\\d.]*)/",
      'lines' => 42,
    ),
    'xautoload' => function ($adapter) {
      $adapter
        ->add('Facebook', 'src');
    },
    // Default list of files of the library to load. Important: Only specify
    // third-party files belonging to the library here, not integration files of
    // your module.
    'files' => array(
      // For PHP libraries, specify include files here, still relative to the
      // library path.
      'php' => array(
        'autoload.php',
      ),
    ),
  );
  $libraries['twitter'] = array(
    // Only used in administrative UI of Libraries API.
    'name' => 'PHP SDK for Twitter APIs',
    'vendor url' => 'https://dev.twitter.com/overview/api/twitter-libraries',
    'download url' => 'https://github.com/J7mbo/twitter-api-php/archive/master.zip',
    // Specify arguments for the version callback. By default,
    // libraries_get_version() takes a named argument array:
    'version arguments' => array(
      'file' => 'TwitterAPIExchange.php',
      'pattern' => "/v[-+]?([0-9]*\\.[0-9]+|[0-9]+) API/",
      'lines' => 4,
    ),
    // Default list of files of the library to load. Important: Only specify
    // third-party files belonging to the library here, not integration files of
    // your module.
    'files' => array(
      // For PHP libraries, specify include files here, still relative to the
      // library path.
      'php' => array(
        'TwitterAPIExchange.php',
      ),
    ),
  );
  $libraries['instagram'] = array(
    // Only used in administrative UI of Libraries API.
    'name' => 'PHP SDK for Instagram APIs',
    'vendor url' => 'https://github.com/cosenary/Instagram-PHP-API',
    'download url' => 'https://github.com/cosenary/Instagram-PHP-API/archive/master.zip',
    // Specify arguments for the version callback. By default,
    // libraries_get_version() takes a named argument array:
    'version arguments' => array(
      'file' => 'src/Instagram.php',
      'pattern' => "/@version [-+]?([0-9]*\\.[0-9]+|[0-9]+)/",
      'lines' => 14,
    ),
    'xautoload' => function ($adapter) {
      $adapter
        ->add('MetzWeb\\Instagram', 'src');
    },
    // Default list of files of the library to load. Important: Only specify
    // third-party files belonging to the library here, not integration files of
    // your module.
    'files' => array(
      // For PHP libraries, specify include files here, still relative to the
      // library path.
      'php' => array(
        'src/Instagram.php',
      ),
    ),
  );
  return $libraries;
}