Fixed local property syntax.
This commit is contained in:
parent
169bab65f9
commit
7c7c33b716
1 changed files with 7 additions and 2 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue