hashem/instaget

A simple PHP library to get Instagram photos per user

v1.0.0 2015-02-11 16:43 UTC

This package is not auto-updated.

Last update: 2024-04-27 15:20:28 UTC


README

Author Software License Packagist Version Total Downloads

Instaget is a simple PHP library to get Instagram photos per user and to store them on the local server for later usage. Instaget is still in beta, more features will be implemented in the upcoming versions.

Installation

Instaget is available via Composer:

$ composer require hashem/instaget

Usage

use Hashem\Instaget\Instaget as Instaget;
use League\Flysystem\Filesystem;
use League\Flysystem\AdapterInterface;
use League\Flysystem\Adapter\Local as Adapter;

# Our (private) Filesystem
$fs = new Filesystem(new Adapter(__DIR__.'/'), [
    'visibility' => AdapterInterface::VISIBILITY_PRIVATE
]);

$inst = new Instaget($fs, [
	'clientID'  => 'YOUR_CLIENT_ID',
	'username'  => 'USERNAME',
	# Optional parameters:
	'count'     => 6,         // user feed limit
	'imageType' => 'large',   // size of the instagram shots
	'expTime'   => 3600,      // image caching exp. time
	'imagePath' => 'images/', // path to the image directory, with trailing forward-slash
	'dataPath'  => 'data/'    // path to the user's info directory, with trailing forward-slash
]);

# Get/Store the shots!
$shots = $inst->run();

Requirements

Instaget requires PHP 5.4+ and League\Flysystem filesystem.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email hashem at qolami dot com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.