summary refs log tree commit diff
path: root/lib/index.ts
diff options
context:
space:
mode:
authorPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2019-10-14 09:47:28 +0200
committerPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2019-10-14 09:47:51 +0200
commit49e82e812812ba75175d98173379d2e416e17b8f (patch)
treef67bdcffce9aca8a76b534124a0eabbe85658768 /lib/index.ts
parent262ebdc07892f3c892d4831c276444df6f6e22f1 (diff)
downloadkronikarz-49e82e812812ba75175d98173379d2e416e17b8f.tar.gz
kronikarz-49e82e812812ba75175d98173379d2e416e17b8f.zip
Add getPost
Diffstat (limited to 'lib/index.ts')
-rw-r--r--lib/index.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/index.ts b/lib/index.ts
index 61e38c8..ade7180 100644
--- a/lib/index.ts
+++ b/lib/index.ts
@@ -1,3 +1,4 @@
+import { getPost as apiGetPost } from "./getPost";
 import { getPosts as apiGetPosts } from "./getPosts";
 import { Post } from "./interfaces";
 
@@ -11,4 +12,7 @@ export default class Kronikarz {
   getPosts(): Array<Post> {
     return apiGetPosts(this.postPath);
   }
+  getPost(year: string, month: string, day: string, title: string): Post {
+    return apiGetPost({ year, month, day, title }, this.postPath);
+  }
 }