From 49e82e812812ba75175d98173379d2e416e17b8f Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Mon, 14 Oct 2019 09:47:28 +0200 Subject: Add getPost --- lib/index.ts | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/index.ts') 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 { return apiGetPosts(this.postPath); } + getPost(year: string, month: string, day: string, title: string): Post { + return apiGetPost({ year, month, day, title }, this.postPath); + } } -- cgit 1.4.1