diff options
Diffstat (limited to 'lib/index.ts')
-rw-r--r-- | lib/index.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/index.ts b/lib/index.ts index ade7180..f9647bc 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -1,5 +1,6 @@ import { getPost as apiGetPost } from "./getPost"; import { getPosts as apiGetPosts } from "./getPosts"; +import { generateApi as apiGenerateApi } from "./generateApi" import { Post } from "./interfaces"; export default class Kronikarz { @@ -15,4 +16,8 @@ export default class Kronikarz { getPost(year: string, month: string, day: string, title: string): Post { return apiGetPost({ year, month, day, title }, this.postPath); } + generateApi(path: string) { + const posts = this.getPosts(); + apiGenerateApi(posts, path) + } } |