From 7c7c33b716724d3f674b2b9a76e2e4725fbaa852 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Wed, 8 Nov 2017 20:04:02 -0800 Subject: [PATCH] Fixed local property syntax. --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ec04161..0974365 100644 --- a/README.md +++ b/README.md @@ -130,7 +130,11 @@ PINBOARD_API_TOKEN=user\:TOKEN ``` ```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: @@ -141,7 +145,8 @@ my.api.key=user\:TOKEN ``` ```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