ImgFlip-Lovers / imgflip4j

Java SDK to interact with imgflip

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

imgflip4j

Java SDK to interact with imgflip

Because interacting with Imgflip from Java should be as easy as :

Top 10 most captionned memes

System.out.println("-- Top 10 most captionned memes --");
int i = 1;
for (Meme meme : ImgFlipAPI.getTopNMemes(10)) {
    System.out.println(i + ". " + meme);
    i++;
}

Published memes

List<PublishedMeme> memes = PublishedMemesCrawler.getPublishedMemes();
int i = 1;
for (PublishedMeme aMeme : memes) {
  System.out.println(i + ". " + aMeme);
  i++;
}

Popular streams

logger.info("get populars streams (NSFW not included)");
List<PopularStream> defaultPopularStreams = PopularStreamCrawler.getPopularStreams();
for (PopularStream popularStream : defaultPopularStreams) {
    logger.info("title : {} {}", popularStream.getTitle(), popularStream.getNSFW() ? "(NSFW)" : "");
}
logger.info("Count : {}", defaultPopularStreams.size());

logger.info("get populars NSFW streams (only)");
List<PopularStream> nsfwPopularStreams = PopularStreamCrawler.getPopularNSFWStreams();
for (PopularStream popularStream : nsfwPopularStreams) {
    logger.info("title : {} {}", popularStream.getTitle(), popularStream.getNSFW() ? "(NSFW)" : "");
}
logger.info("Count : {}", nsfwPopularStreams.size());

Top Users

logger.info("get top users");
List<TopUser> users = TopUserCrawler.getTopUsers();
for (TopUser user : users) {
    logger.info("user : {} {}", user.getRank(), user.getUser());
}
logger.info("Count : {}", users.size());

User

final String userName = "userName";

String url = getUserUrl(userName);
User user = getUser(userName);

logger.info("user {} ({}) : {}", userName, url, user);

Resources

About

Java SDK to interact with imgflip

License:MIT License


Languages

Language:Java 100.0%