Download the PHP package ghanem/giphy without Composer
On this page you can find all versions of the php package ghanem/giphy. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package giphy
Giphy and Stickers
A package that provides an interface between Laravel and Giphy API, includes Gifs and Stickers.
Installation
You can install the package via composer:
now you need to publish the config file with:
Parameters
- q - search query term or phrase
- s - search query term or phrase
- limit - (optional) number of results to return, maximum 100. Default 25.
- offset - (optional) results offset, defaults to 0.
- rating - (optional) limit results to those rated (y,g, pg, pg-13 or r).
- lang - (optional) specify default country for regional content; format is 2-letter ISO 639-1 country code. See list of supported langauges here
Endpoints
- Gifs
- Search
- Translate
- Trending
- Random
- By id
- By id
- Stickers
- Sticker Search
- Sticker Translate
- Sticker Trending
- Sticker Random
Gifs
Search
Search all Giphy GIFs for a word or phrase. Punctuation will be stripped and ignored. On this case, $giphys
is an array.
Method: Giphy::search($query, $limit = 25, $offset = 0, $rating = null, $lang = null)
You can do a dd($giphys)
to see all attributes:
Translate
The translate API draws on search, but uses the Giphy "special sauce" to handle translating from one vocabulary to another.
Method: Giphy::translate($query, $rating = null, $lang = null)
You can do a dd($giphy)
to see all attributes:
Trending
Fetch GIFs currently trending online. On this case, $giphys
is an array.
Method: Giphy::trending($limit = 25, $rating = null)
You can do a dd($giphys)
to see all attributes:
Random
Returns a random GIF, limited by tag.
Method: Giphy::random($query, $rating = null)
You can do a dd($giphy)
to see all attributes:
By ID
Returns meta data about a GIF, by GIF id.
Method: Giphy::getByID($id)
You can do a dd($giphy)
to see all attributes:
By IDs
A multiget version of the get GIF by ID endpoint. On this case, $giphys
is an array.
Method: Giphy::getByIDs(array $ids)
You can do a dd($giphys)
to see all attributes:
Stickers
The methods of Stickers are similar to the methods Giphy, so I will omit the examples of dd()
, but also you can use it to view all the attributes of objects.
Sticker Search
Search all Sticker for a word or phrase. Punctuation will be stripped and ignored. On this case, $stickers
is an array.
Method: Stickers::search($query, $limit = 25, $offset = 0, $rating = null, $lang = null)
Sticker Translate
The translate API draws on search, but uses the Stickers "special sauce" to handle translating from one vocabulary to another.
Method: Stickers::translate($query, $rating = null, $lang = null)
Sticker Trending
Fetch Stickers currently trending online. On this case, $stickers
is an array.
Method: Stickers::trending($limit = 25, $rating = null)
Sticker Random
Returns a random Sticker, limited by tag.
Method: Stickers::random($query, $rating = null)