Bumped to bld 1.9.0

This commit is contained in:
Erik C. Thauvin 2024-02-26 17:31:59 -08:00
parent 715d65fc7e
commit 23af5c6884
10 changed files with 27 additions and 54 deletions

View file

@ -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/).