No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs
lib
test/Api
vendor
.swagger-codegen-ignore
.travis.yml
LICENSE.txt
README.md
autoload.php
composer.json
composer.lock
config.json
generate.sh
git_push.sh
phpunit.xml.dist
public.yaml

README.md

Giphy Core Client for PHP

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