From 01c8336cd0c99d3cc2f41b246c77d7ec904e2438 Mon Sep 17 00:00:00 2001 From: petersamokhin Date: Sun, 22 Nov 2020 22:36:53 +0000 Subject: [PATCH] Make notion class closeable --- build.gradle.kts | 2 +- src/main/kotlin/com/petersamokhin/notionapi/Notion.kt | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 8c7deea..16a73b0 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -16,7 +16,7 @@ repositories { } group = "com.petersamokhin.notionapi" -version = "0.0.5" +version = "0.0.6" dependencies { diff --git a/src/main/kotlin/com/petersamokhin/notionapi/Notion.kt b/src/main/kotlin/com/petersamokhin/notionapi/Notion.kt index bfc8488..085d88e 100644 --- a/src/main/kotlin/com/petersamokhin/notionapi/Notion.kt +++ b/src/main/kotlin/com/petersamokhin/notionapi/Notion.kt @@ -37,6 +37,8 @@ class Notion(private val token: String, private var httpClient: HttpClient) { ) } + fun close() = httpClient.close() + companion object { private const val NOTION_TOKEN_COOKIE_KEY = "token_v2" }