hashem/instaget

一个简单的PHP库,用于获取每个用户的Instagram照片

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

This package is not auto-updated.

Last update: 2024-09-28 17:07:21 UTC


README

Author Software License Packagist Version Total Downloads

Instaget是一个简单的PHP库,用于获取每个用户的Instagram照片并将它们存储在本地服务器上以供以后使用。Instaget目前处于测试版,未来版本将实现更多功能。

安装

Instaget可以通过Composer获取。

$ composer require hashem/instaget

使用方法

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();

要求

Instaget需要PHP 5.4+和League\Flysystem文件系统。

贡献

请参阅CONTRIBUTING以获取详细信息。

安全

如果您发现任何与安全相关的问题,请通过电子邮件hashem at qolami dot com联系,而不是使用问题跟踪器。

致谢

许可

MIT许可证(MIT)。请参阅许可证文件以获取更多信息。