Home

Awesome

License: GPL v3 Build Status codecov Codacy Badge

Giphy4J

An unofficial Java library for the Giphy API.

Access and API Keys

Take a look at the Giphy API page to get your api key.

Example

	Giphy giphy = new Giphy(API_KEY);
	
	SearchFeed feed = giphy.search("cat", 1, 0);
	
	feed.getDataList().get(0).getImages().getOriginal().getUrl();

Rendition Guide

How to Use

Quick showcase how to use the library.

Search Endpoint

	Giphy giphy = new Giphy(API_KEY);
	
	SearchFeed feed = giphy.search("cat", 1, 0);
	
	feed.getDataList().get(0).getImages().getOriginal().getUrl();

Get GIF by ID Endpoint

	Giphy giphy = new Giphy(API_KEY);
	
	SearchGiphy giphyData = giphy.searchByID("feqkVgjJpYtjy");
	
	giphyData.getData().getImages().getOriginal().getUrl();

Translate Endpoint

	Giphy giphy = new Giphy(API_KEY);
	
	SearchGiphy giphyData = giphy.translate("superman");
	
	giphyData.getData().getImages().getOriginal().getUrl();

Random Endpoint

	Giphy giphy = new Giphy(API_KEY);
	
	SearchRandom giphyData = giphy.searchRandom("cat");
	
	giphyData.getData().getImageOriginalUrl();

Trending GIFs Endpoint

	Giphy giphy = new Giphy(API_KEY);
	
	SearchFeed feed = giphy.trend();
	
	feed.getDataList().get(0).getImages().getOriginal().getUrl();

STICKER Search Endpoint

	Giphy giphy = new Giphy(API_KEY);
	
	SearchFeed feed = giphy.searchSticker("cat", 1, 0);
	
	feed.getDataList().get(0).getImages().getOriginal().getUrl();

STICKER Translate Endpoint

	Giphy giphy = new Giphy(API_KEY);
	
	SearchGiphy giphyData = giphy.translateSticker("superman");
	
	giphyData.getData().getImages().getOriginal().getUrl();

STICKER Random Endpoint

	Giphy giphy = new Giphy(API_KEY);
	
	SearchRandom giphyData = giphy.trendSticker("cat");
	
	giphyData.getData().getImageOriginalUrl();

STICKER Trending Endpoint

	Giphy giphy = new Giphy(API_KEY);
	
	SearchFeed feed = giphy.trendSticker();
	
	feed.getDataList().get(0).getImages().getOriginal().getUrl();

Download Giphy4J

Giphy4J can either be downloaded as a JAR file or embedded as Maven dependency.

Manual Install

Download JAR from here.

Maven

	<dependency>
		<groupId>at.mukprojects</groupId>
		<artifactId>giphy4j</artifactId>
		<version>1.0.1</version>
	</dependency>