A SIMPLE unofficial SDK for Imgur written in Kotlin.
Choose above what dependency manager you'd like to use and follow the steps.
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependency>
<groupId>com.github.ianguuima</groupId>
<artifactId>Imgur-Kotlin-SDK</artifactId>
<version>e313fae670</version>
</dependency>
repositories {
...
maven { url 'https://jitpack.io' }
}
dependencies {
implementation 'com.github.ianguuima:Imgur-Kotlin-SDK:e313fae670'
}
Get your clientId. It's important to proceed and use the methods.
val imgur = Imgur(
clientId = clientId
)
More easy than this? Impossible!
val uploadResponse = imgur.upload(
file = file
)
The response will return what you need, such link and image hash.
val isDeleted = imgur.delete(
deleteHash = deleteHash
)
You can get the deleteHash from the uploadResponse and isDeleted will return whether the image is deleted or not.
I made this SDK to be simple. Pull requests are welcome. Consider leaving a star if this repo helped you.