fix(core): update
This commit is contained in:
40
ts/smartfeed.classes.feed.ts
Normal file
40
ts/smartfeed.classes.feed.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
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"
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user