import { RemoteFeedType } from "../types";


const remoteFeeds: RemoteFeedType[] = []; // Some where to keep perisistance

class RemoteFeeds {
    public static setFeed(remoteFeed: RemoteFeedType) {
        remoteFeeds.push(remoteFeed);
    }
    public static getFeeds() {
        return remoteFeeds;
    }
    public static getUserFeed(id: number) {
        return remoteFeeds.filter(feed => feed.id === id);
    }
};


export default RemoteFeeds;