An open API service indexing awesome lists of open source software.

https://github.com/auties00/linkpreview

Generate a preview for a link or for a text containing links
https://github.com/auties00/linkpreview

extract java link link-preview preview

Last synced: about 1 year ago
JSON representation

Generate a preview for a link or for a text containing links

Awesome Lists containing this project

README

          

# 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](https://github.com/ospfranco/link-preview-js)
as I was looking for an alternative to this library for Java but couldn't find any.

### How to install

#### Maven

```xml

com.github.auties00
link-preview
2.4

```

#### Gradle

1. Groovy DSL
```groovy
implementation 'com.github.auties00:link-preview:2.4'
```

2. Kotlin DSL
```kotlin
implementation("com.github.auties00:link-preview:2.4")
```

### How to use

1. Text
```java
LinkPreview.createPreviews("This is a string containing links: google.com");
```

2. URI
```java
LinkPreview.createPreviews(URI.create("https://google.com/"));
```