diff --git a/.idea/libraries/bld.xml b/.idea/libraries/bld.xml index 261827d..b274e9d 100644 --- a/.idea/libraries/bld.xml +++ b/.idea/libraries/bld.xml @@ -2,12 +2,12 @@ - + - + diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index da08743..0000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "version": "0.2.0", - "configurations": [ - { - "type": "java", - "name": "Run Tests", - "request": "launch", - "mainClass": "net.thauvin.erik.bitly.BitlyShortenTest" - } - ] -} diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 1b057c3..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "java.project.sourcePaths": [ - "src/main/java", - "src/main/resources", - "src/test/java", - "src/bld/java" - ], - "java.configuration.updateBuildConfiguration": "automatic", - "java.project.referencedLibraries": [ - "${HOME}/.bld/dist/bld-1.8.0.jar", - "lib/bld/*.jar", - "lib/compile/*.jar", - "lib/provided/*.jar", - "lib/runtime/*.jar", - "lib/test/*.jar" - ] -} diff --git a/README.md b/README.md index cb9def9..c1a4d8d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![License (3-Clause BSD)](https://img.shields.io/badge/license-BSD%203--Clause-blue.svg?style=flat-square)](https://opensource.org/licenses/BSD-3-Clause) [![Kotlin](https://img.shields.io/badge/kotlin-1.9.21-7f52ff)](https://kotlinlang.org/) -[![bld](https://img.shields.io/badge/1.8.0-FA9052?label=bld&labelColor=2392FF)](https://rife2.com/bld) +[![bld](https://img.shields.io/badge/1.9.0-FA9052?label=bld&labelColor=2392FF)](https://rife2.com/bld) [![Release](https://img.shields.io/github/release/ethauvin/bitly-shorten.svg)](https://github.com/ethauvin/bitly-shorten/releases/latest) [![Maven Central](https://img.shields.io/maven-central/v/net.thauvin.erik/bitly-shorten.svg?color=blue)](https://central.sonatype.com/artifact/net.thauvin.erik/bitly-shorten) [![Nexus Snapshot](https://img.shields.io/nexus/s/net.thauvin.erik/bitly-shorten?label=snapshot&server=https%3A%2F%2Foss.sonatype.org%2F)](https://oss.sonatype.org/content/repositories/snapshots/net/thauvin/erik/bitly-shorten/) @@ -37,7 +37,7 @@ bitly.bitlinks().update("https://bit.ly/380ojFd", title = "Erik's Weblog", tags - View [bld](https://github.com/ethauvin/bitly-shorten/blob/master/examples/bld) or [Gradle](https://github.com/ethauvin/bitly-shorten/blob/master/examples/gradle) Examples. -### API Access Token +## API Access Token The Bitly API [Access Token](https://bitly.is/accesstoken) can be specified directly as well as via the `BITLY_ACCESS_TOKEN` environment variable or properties key. @@ -55,7 +55,7 @@ val bitly = Bitly(File("my.properties")) BITLY_ACCESS_TOKEN=abc123def456ghi789jkl0 ``` -### bld +## bld To use with [bld](https://rife2.com/bld), include the following dependency in your [build](https://github.com/ethauvin/bitly-shorten/blob/master/examples/bld/src/bld/java/com/example/ExampleBuild.java) file: @@ -65,9 +65,10 @@ repositories = List.of(MAVEN_CENTRAL, SONATYPE_SNAPSHOTS_LEGACY); scope(compile) .include(dependency("net.thauvin.erik:bitly-shorten:1.0.1")); ``` + Be sure to use the [bld Kotlin extension](https://github.com/rife2/bld-kotlin) in your project. -### Gradle, Maven, etc… +## Gradle, Maven, etc… To use with [Gradle](https://gradle.org/), include the following dependency in your [build](https://github.com/ethauvin/bitly-shorten/blob/master/examples/gradle/build.gradle.kts) file: @@ -108,7 +109,7 @@ var config = new UpdateConfig.Builder() bitly.bitlinks().update(config); ``` -### JSON +## JSON All implemented API calls can return the full JSON responses: @@ -125,6 +126,8 @@ bitly.bitlinks().shorten("https://www.erik.thauvin.net/blog", toJson = true) } ``` +## API Response & Endpoints + You can also access the last response from implemented API calls using: ```kotlin @@ -170,10 +173,6 @@ if (response.isSuccessful) { - View [Example](https://github.com/ethauvin/bitly-shorten/blob/master/examples/src/main/kotlin/com/example/BitlyRetrieve.kt) -### More… - -If all else fails, there's always more [Documentation](https://ethauvin.github.io/bitly-shorten/). - ## Contributing If you want to contribute to this project, all you have to do is clone the GitHub @@ -192,3 +191,7 @@ cd bitly-shorten The project has an [IntelliJ IDEA](https://www.jetbrains.com/idea/) project structure. You can just open it after all the dependencies were downloaded and peruse the code. + +## More… + +If all else fails, there's always more [Documentation](https://ethauvin.github.io/bitly-shorten/). diff --git a/examples/bld/.idea/libraries/bld.xml b/examples/bld/.idea/libraries/bld.xml index 093dffa..da89d8c 100644 --- a/examples/bld/.idea/libraries/bld.xml +++ b/examples/bld/.idea/libraries/bld.xml @@ -2,12 +2,12 @@ - + - + diff --git a/examples/bld/.vscode/settings.json b/examples/bld/.vscode/settings.json index 1b057c3..9e8368e 100644 --- a/examples/bld/.vscode/settings.json +++ b/examples/bld/.vscode/settings.json @@ -3,15 +3,13 @@ "src/main/java", "src/main/resources", "src/test/java", - "src/bld/java" + "src/test/resources", + "src/bld/java", + "src/bld/resources" ], "java.configuration.updateBuildConfiguration": "automatic", "java.project.referencedLibraries": [ - "${HOME}/.bld/dist/bld-1.8.0.jar", - "lib/bld/*.jar", - "lib/compile/*.jar", - "lib/provided/*.jar", - "lib/runtime/*.jar", - "lib/test/*.jar" + "${HOME}/.bld/dist/bld-1.9.0.jar", + "lib/**/*.jar" ] } diff --git a/examples/bld/lib/bld/bld-wrapper.jar b/examples/bld/lib/bld/bld-wrapper.jar index 83ed707..4f1621e 100644 Binary files a/examples/bld/lib/bld/bld-wrapper.jar and b/examples/bld/lib/bld/bld-wrapper.jar differ diff --git a/examples/bld/lib/bld/bld-wrapper.properties b/examples/bld/lib/bld/bld-wrapper.properties index 6a3f215..142e058 100644 --- a/examples/bld/lib/bld/bld-wrapper.properties +++ b/examples/bld/lib/bld/bld-wrapper.properties @@ -1,7 +1,7 @@ bld.downloadExtensionJavadoc=false bld.downloadExtensionSources=true -bld.extensions=com.uwyn.rife2:bld-kotlin:0.9.0-SNAPSHOT +bld.extensions=com.uwyn.rife2:bld-kotlin:0.9.1 bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES bld.downloadLocation= bld.sourceDirectories= -bld.version=1.8.0 +bld.version=1.9.0 diff --git a/lib/bld/bld-wrapper.jar b/lib/bld/bld-wrapper.jar index 83ed707..4f1621e 100644 Binary files a/lib/bld/bld-wrapper.jar and b/lib/bld/bld-wrapper.jar differ diff --git a/lib/bld/bld-wrapper.properties b/lib/bld/bld-wrapper.properties index 064de94..d824691 100644 --- a/lib/bld/bld-wrapper.properties +++ b/lib/bld/bld-wrapper.properties @@ -1,9 +1,9 @@ bld.downloadExtensionJavadoc=false bld.downloadExtensionSources=true -bld.extension-jacoco=com.uwyn.rife2:bld-jacoco-report:0.9.2 -bld.extensions=com.uwyn.rife2:bld-kotlin:0.9.0 -bld.extension-detekt=com.uwyn.rife2:bld-detekt:0.9.1 +bld.extension-jacoco=com.uwyn.rife2:bld-jacoco-report:0.9.3 +bld.extensions=com.uwyn.rife2:bld-kotlin:0.9.1 +bld.extension-detekt=com.uwyn.rife2:bld-detekt:0.9.2 bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES bld.downloadLocation= bld.sourceDirectories= -bld.version=1.8.0 +bld.version=1.9.0