public class Giphy extends Object
| Constructor and Description |
|---|
Giphy(String apiKey)
Constructs a new Giphy object.
|
Giphy(String apiKey,
RequestSender sender)
Constructs a new HttpRequestSender object.
|
| Modifier and Type | Method and Description |
|---|---|
SearchFeed |
search(String query,
int offset)
Search all Giphy GIFs for a word or phrase and returns a SearchFeed
object.
|
SearchFeed |
search(String query,
int limit,
int offset)
Search all Giphy GIFs for a word or phrase and returns a SearchFeed
object.
|
SearchGiphy |
searchByID(String id)
Returns a SerachGiphy object.
|
SearchRandom |
searchRandom(String tag)
Returns a random GIF, limited by tag.
|
SearchRandom |
searchRandomSticker(String tag)
Returns a random GIF, limited by tag.
|
SearchFeed |
searchSticker(String query,
int offset)
Search all Giphy Sticker GIFs for a word or phrase and returns a
SearchFeed object.
|
SearchFeed |
searchSticker(String query,
int limit,
int offset)
Search all Giphy Sticker GIFs for a word or phrase and returns a
SearchFeed object.
|
SearchGiphy |
translate(String query)
The translate API draws on search, but also translates from one
vocabulary to another.
|
SearchGiphy |
translateSticker(String query)
The translate API draws on search, but also translates from one
vocabulary to another.
|
SearchFeed |
trend()
Fetch GIFs currently trending online.
|
SearchFeed |
trendSticker()
Fetch GIFs currently trending online.
|
public Giphy(String apiKey)
apiKey - the GiphyAPI keypublic Giphy(String apiKey, RequestSender sender)
It's recommended to use the simple constructor without a sender argument. This one is just for testing purposes or in case you want to use the sender with different settings.
apiKey - the GiphyAPI keysender - the sender objectpublic SearchFeed search(String query, int offset) throws GiphyException
Be aware that not every response has all information available. In that case the value will be returned as null.
query - the query parameters. Multiple parameters are separated by a
spaceoffset - the offsetGiphyException - if an error occurs during the searchpublic SearchFeed search(String query, int limit, int offset) throws GiphyException
Be aware that not every response has all information available. In that case the value will be returned as null.
query - the query parameters. Multiple parameters are separated by a
spacelimit - the result limit. The maximum is 100.offset - the offsetGiphyException - if an error occurs during the searchpublic SearchGiphy searchByID(String id) throws GiphyException
Be aware that not every response has all information available. In that case the value will be returned as null.
id - the Giphy idGiphyException - if an error occurs during the searchpublic SearchGiphy translate(String query) throws GiphyException
Be aware that not every response has all information available. In that case the value will be returned as null.
query - the query parametersGiphyException - if an error occurs during the searchpublic SearchRandom searchRandom(String tag) throws GiphyException
Be aware that not every response has all information available. In that case the value will be returned as null.
tag - the GIF tag to limit randomnessGiphyException - if an error occurs during the searchpublic SearchFeed trend() throws GiphyException
Be aware that not every response has all information available. In that case the value will be returned as null.
GiphyException - if an error occurs during the searchpublic SearchFeed searchSticker(String query, int offset) throws GiphyException
Be aware that not every response has all information available. In that case the value will be returned as null.
query - the query parameters. Multiple parameters are separated by a
spaceoffset - the offsetGiphyException - if an error occurs during the searchpublic SearchFeed searchSticker(String query, int limit, int offset) throws GiphyException
Be aware that not every response has all information available. In that case the value will be returned as null.
query - the query parameters. Multiple parameters are separated by a
spacelimit - the result limit. The maximum is 100.offset - the offsetGiphyException - if an error occurs during the searchpublic SearchGiphy translateSticker(String query) throws GiphyException
Be aware that not every response has all information available. In that case the value will be returned as null.
query - the query parametersGiphyException - if an error occurs during the searchpublic SearchFeed trendSticker() throws GiphyException
Be aware that not every response has all information available. In that case the value will be returned as null.
GiphyException - if an error occurs during the searchpublic SearchRandom searchRandomSticker(String tag) throws GiphyException
Be aware that not every response has all information available. In that case the value will be returned as null.
tag - the GIF tag to limit randomnessGiphyException - if an error occurs during the searchCopyright © 2016 MuK Projects. All rights reserved.