PHP 接口,用于访问 Gfycat API。

v1.0 2017-11-15 00:55 UTC

This package is auto-updated.

Last update: 2024-09-09 14:15:31 UTC


README

Gfycat 的 PHP 接口,支持 GET 和 SEARCH 操作

安装

composer require kevincobain2000/gfycat
composer update -vvv

设置

从 Gfycat 开发者控制台获取您的 ClientId 和 ClientSecret

用法

获取

$gfycat = new Gfycat($this->clientId, $this->clientSecret);

$gfyid = 'heartfeltsorrowfulbushsqueaker';
$response = $gfycat->get($gfyid);

搜索

$gfycat = new Gfycat($this->clientId, $this->clientSecret);

$query = 'keywords';
$response = $gfycat->search($query);

测试

vendor/bin/phpunit