diff options
Diffstat (limited to 'lib/index.ts')
-rw-r--r-- | lib/index.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/index.ts b/lib/index.ts index ade7180..4bf4dd3 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -1,6 +1,7 @@ import { getPost as apiGetPost } from "./getPost"; import { getPosts as apiGetPosts } from "./getPosts"; -import { Post } from "./interfaces"; +import { generateApi as apiGenerateApi } from "./generateApi" +import Post from "./Post"; export default class Kronikarz { postPath: string; @@ -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) + } } |