blob: ade7180f50e0d63d3687f9bbd13bcb21b53c0a45 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
import { getPost as apiGetPost } from "./getPost";
import { getPosts as apiGetPosts } from "./getPosts";
import { Post } from "./interfaces";
export default class Kronikarz {
postPath: string;
constructor(postPath: string) {
this.postPath = postPath;
}
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);
}
}
|