定制 wallrio/instafeed 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

wallrio/instafeed

Composer 安装命令:

composer require wallrio/instafeed

包简介

captures instagram user posts

README 文档

README

captures instagram user posts

Installation

It's recommended that you use Composer to install Directly.

$ composer require wallrio/instafeed "*"

Usage

Capture data from account

To capture information and publications from a user use the Profile class with the get

  • $profile->username(USERNAME_OF_USER);
  • $profile->get(CALLBACK_OPTIONAL);

Example

	use InstaFeed\Profile as Profile;
	$profile = new Profile();

	$profile->username('wallace.rio');
	$instaData = $profile->get();

	print_r($instaData);

Use cache

  • $profile->useCache = true;
  • $profile->cache->dir(DIRECTORY_OF_CACHE); (optional)

if method '$profile->cache->dir' is omitted, the directory will be the temporary directory (/tmp/instaFeed).

use InstaFeed\Profile as Profile;
$profile = new Profile();

$profile->useCache = true;
$profile->cache->dir(__DIR__DIRECTORY_SEPARATOR.'cache'.DIRECTORY_SEPARATOR);

$profile->username('wallace.rio');
$instaData = $profile->get();

run callback if instagram feed has updated

use InstaFeed\Profile as Profile;
$profile = new Profile();

$profile->useCache = true;

$profile->username('wallace.rio');
$instaData = $profile->get(function(){
	// code to run if instagram feed has updated
});

Clean cache

  • $profile->cache->clear(TIME_TO_CLEAN);

  • TIME_TO_CLEAN: is optional and allows as string or integer value.

    • integer: the integer will be defined per second.
    • string: enter a number and a letter referring to the specification of days, hours, minutes, and seconds.

Example of time:

	$profile->cache->clear('30m');		// 30 minutes
	$profile->cache->clear('2d');		// 2 days
	$profile->cache->clear('5h');		// 5 hours

Example implementation:

use InstaFeed\Profile as Profile;
$profile = new Profile();

$profile->useCache = true;
$profile->cache->dir(__DIR__DIRECTORY_SEPARATOR.'cache'.DIRECTORY_SEPARATOR);
$profile->cache->clear();

$profile->username('wallace.rio');
$instaData = $profile->get();

License

The instaFeed is licensed under the MIT license. See License File for more information.

统计信息

  • 总下载量: 13
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-11-16

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固