Skip to content

bvolpato/jiphy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jiphy

Apache License Build Status Maven Central Coverage Status Code Climate PRs Welcome

🎥 jiphy - Java Wrapper for Giphy API

Usage

Download the latest release JAR or grab via Maven:

<dependency>
  <groupId>org.brunocvcunha.jiphy</groupId>
  <artifactId>jiphy</artifactId>
  <version>1.0</version>
</dependency>

or Gradle:

compile 'org.brunocvcunha.jiphy:jiphy:1.0'

Supported Operations & Examples

Initialize

Jiphy jiphy = Jiphy.builder()
    .apiKey(JiphyConstants.API_KEY_BETA)
    .build();

Search

JiphySearchResponse cats = jiphy.sendRequest(new JiphySearchRequest("cats"));

for (JiphyGif gif : cats.getData()) {
    System.out.println("Cat: " + gif.getUrl());
}

Trending

JiphySearchResponse trending = jiphy.sendRequest(new JiphyTrendingRequest());

Translate

JiphySearchResponse superman = jiphy.sendRequest(new JiphyTranslateRequest("superman"));

Upload

JiphyUploadResult upload = jiphy.sendRequest(new JiphyUploadRequest(new File("/path/to/cats.gif")));
System.out.println("Uploaded, id: " + upload.getData().getId());

Snapshots of the development version are available in Sonatype's snapshots repository.

jiphy requires at minimum Java 8.

About

🎥 Jiphy - Java wrapper for Giphy API

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages