Fixed local property syntax.

This commit is contained in:
Erik C. Thauvin 2017-11-08 20:04:02 -08:00
parent 169bab65f9
commit 7c7c33b716

View file

@ -130,7 +130,11 @@ PINBOARD_API_TOKEN=user\:TOKEN
``` ```
```kotlin ```kotlin
val poster = PinboardPoster(Paths.get("local.properties")) val properties = Properties().apply {
Files.newInputStream(Paths.get("local.properties")).use { fis -> load(fis) }
}
val poster = PinboardPoster(properties)
``` ```
To specify your own key: To specify your own key:
@ -141,7 +145,8 @@ my.api.key=user\:TOKEN
``` ```
```kotlin ```kotlin
val poster = PinboardPoster(Paths.get("my.properties"), "my.api.key") val properties = Properties().apply { FileInputStream("my.properties").use { fis -> load(fis) } }
val poster = PinboardPoster(properties, "my.api.key")
``` ```
### Environment Variable ### Environment Variable