giphy/giphy-php-client 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

giphy/giphy-php-client

最新稳定版本:1.0.0

Composer 安装命令:

composer require giphy/giphy-php-client

包简介

README 文档

README

The Giphy Core SDK is a wrapper around Giphy API.

Build Status

Giphy is the best way to search, share, and discover GIFs on the Internet. Similar to the way other search engines work, the majority of our content comes from indexing based on the best and most popular GIFs and search terms across the web. We organize all those GIFs so you can find the good content easier and share it out through your social channels. We also feature some of our favorite GIF artists and work with brands to create and promote their original GIF content.

Getting Started

Requirements

PHP 5.4.0 and later

Installation & Usage

Installation:

composer require giphy/giphy-php-client

Usage:

    require_once('/path/to/GiphyClient/autoload.php');

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new GPH\Api\DefaultApi();
$api_key = "dc6zaTOxFJmzC"; // string | Giphy API Key.
$q = "cheeseburgers"; // string | Search query term or prhase.
$limit = 25; // int | The maximum number of records to return.
$offset = 0; // int | An optional results offset. Defaults to 0.
$rating = "g"; // string | Filters results by specified rating.
$lang = "en"; // string | Specify default country for regional content; use a 2-letter ISO 639-1 country code. See list of supported languages <a href = \"../language-support\">here</a>.
$fmt = "json"; // string | Used to indicate the expected response format. Default is Json.

try {
    $result = $api_instance->gifsSearchGet($api_key, $q, $limit, $offset, $rating, $lang, $fmt);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->gifsSearchGet: ', $e->getMessage(), PHP_EOL;
}
?>

Documentation for API Endpoints

All URIs are relative to http://api.giphy.com/v1

Class Method HTTP request Description
DefaultApi gifsCategoriesCategoryGet GET /gifs/categories/{category} Category Tags Endpoint.
DefaultApi gifsCategoriesCategoryTagGet GET /gifs/categories/{category}/{tag} Tagged Gifs Endpoint.
DefaultApi gifsCategoriesGet GET /gifs/categories Categories Endpoint.
DefaultApi gifsGet GET /gifs Get GIFs by ID Endpoint
DefaultApi gifsGifIdGet GET /gifs/{gif_id} Get GIF by ID Endpoint
DefaultApi gifsRandomGet GET /gifs/random Random Endpoint
DefaultApi gifsSearchGet GET /gifs/search Search Endpoint
DefaultApi gifsTranslateGet GET /gifs/translate Translate Endpoint
DefaultApi gifsTrendingGet GET /gifs/trending Trending GIFs Endpoint
DefaultApi stickersRandomGet GET /stickers/random Random Sticker Endpoint
DefaultApi stickersSearchGet GET /stickers/search Sticker Search Endpoint
DefaultApi stickersTranslateGet GET /stickers/translate Sticker Translate Endpoint
DefaultApi stickersTrendingGet GET /stickers/trending Trending Stickers Endpoint

Documentation For Models

统计信息

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

GitHub 信息

  • Stars: 11
  • Watchers: 43
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MPLv2
  • 更新时间: 2017-09-27