Link Preview Java
What is link preview
This library generates a preview for a link or for a text containing any number of links. Its functionality is aligned with link-preview-js as I was looking for an alternative to this library for Java but couldn't find any.
How to install
Maven
<dependency>
<groupId>com.github.auties00</groupId>
<artifactId>link-preview</artifactId>
<version>2.1</version>
</dependency>
Gradle
-
Groovy DSL
implementation 'com.github.auties00:link-preview:2.1'
-
Kotlin DSL
implementation("com.github.auties00:link-preview:2.1")
How to use
-
Text
LinkPreview.createPreviews("This is a string containing links: google.com");
-
URI
LinkPreview.createPreviews(URI.create("https://google.com/"));