smartfeed/ts/smartfeed.classes.feed.ts
2020-10-25 14:02:03 +00:00

40 lines
876 B
TypeScript

import * as plugins from './smartfeed.plugins';
export interface IFeedOptions {
domain: string;
title: string;
description: string;
company: string;
companyEmail: string;
companyDomain: string;
}
export interface IFeedItem {}
export class Feed {
options: IFeedOptions;
items: IFeedOptions[];
constructor(optionsArg: IFeedOptions) {
this.options = optionsArg;
}
public addItem() {
}
public exportRssFeed() {
const feed = new plugins.feed.Feed({
copyright: `All rights reserved, ${this.options.company}`,
id: this.options.domain,
title: this.options.title,
author: {
name: this.options.company,
email: this.options.companyEmail,
link: this.options.companyEmail
},
description: this.options.description,
generator: '@pushrocks/smartfeed',
language: "en"
});
}
}