summary refs log tree commit diff
path: root/src/index.ts
blob: 61e38c8b9d451596e07ae18ddd1d2d25881b8925 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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);
  }
}