Skip to content

Commit a2c5f87

Browse files
Added getter for ID and Title for feed and entry
1 parent d5e63d4 commit a2c5f87

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

src/versions/v1_2/entry.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,22 @@ export class Entry {
3737
}
3838
}
3939

40+
/**
41+
* Gets the ID of the entry.
42+
* @returns The ID of the entry.
43+
*/
44+
getId() {
45+
return this.options.id;
46+
}
47+
48+
/**
49+
* Gets the title of the entry.
50+
* @returns The title of the entry.
51+
*/
52+
getTitle() {
53+
return this.options.title;
54+
}
55+
4056
/**
4157
* Adds one or more links to the feed.
4258
* @param links - The links to add.

src/versions/v1_2/feed.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,22 @@ export class Feed {
2626
}
2727
}
2828

29+
/**
30+
* Gets the ID of the feed.
31+
* @returns The ID of the feed.
32+
*/
33+
getId() {
34+
return this.options.id;
35+
}
36+
37+
/**
38+
* Gets the title of the feed.
39+
* @returns The title of the feed.
40+
*/
41+
getTitle() {
42+
return this.options.title;
43+
}
44+
2945
/**
3046
* Adds one or more entries to the feed.
3147
* @param entries - The entries to add.

0 commit comments

Comments
 (0)