giphy/giphy-php-client

1.0.0 2017-09-27 21:06 UTC

This package is not auto-updated.

Last update: 2024-12-11 23:20:45 UTC


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

Documentation For Models