Emojis
Simple Java library for use emojis
Add to your project
To add as dependency using Maven, you should have at pom.xml
:
<dependency>
<groupId>io.github.yogonza524</groupId>
<artifactId>emoji</artifactId>
<version>0.0.2</version>
</dependency>
To add as dependency using Gradle, you should have at build.gradle
:
repositories {
mavenCentral()
}
dependencies {
implementation "io.github.yogonza524:emoji:0.0.2"
}
Examples
- Use an emoji
Emoji bowtie = Emoji.bowtie();
System.out.println("Code: " + bowtie.getCode()); // :bowtie:
System.out.println("Icon: " + bowtie.getImageUrl()); // https://github.githubassets.com/images/icons/emoji/bowtie.png
- Find an emoji
List<Emoji> man = Emoji.find("man"); // Return a list of Emijis when name contains "man"
- List all Emojis
Emoji.all().stream().forEach(System.out::println); // Show all Emojis available
- Get the URL as markdown
Emoji bowtie = Emoji.bowtie();
System.out.println(bowtie.markdown()); //