epist 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.d.ts +6 -1
- package/dist/cjs/index.js +9 -6
- package/dist/esm/index.js +9 -6
- package/package.json +1 -1
- package/src/index.ts +20 -4
package/dist/cjs/index.d.ts
CHANGED
|
@@ -62,5 +62,10 @@ export declare class Epist {
|
|
|
62
62
|
/**
|
|
63
63
|
* Ingest a podcast RSS feed
|
|
64
64
|
*/
|
|
65
|
-
ingestRss(url: string, name?: string, refreshIntervalMinutes?: number
|
|
65
|
+
ingestRss(url: string, name?: string, refreshIntervalMinutes?: number, options?: {
|
|
66
|
+
max_episodes?: number;
|
|
67
|
+
start_date?: string;
|
|
68
|
+
include_keywords?: string;
|
|
69
|
+
exclude_keywords?: string;
|
|
70
|
+
}): Promise<any>;
|
|
66
71
|
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -124,13 +124,16 @@ class Epist {
|
|
|
124
124
|
/**
|
|
125
125
|
* Ingest a podcast RSS feed
|
|
126
126
|
*/
|
|
127
|
-
async ingestRss(url, name, refreshIntervalMinutes) {
|
|
127
|
+
async ingestRss(url, name, refreshIntervalMinutes, options) {
|
|
128
128
|
try {
|
|
129
|
-
const payload = {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
129
|
+
const payload = {
|
|
130
|
+
url,
|
|
131
|
+
name,
|
|
132
|
+
refresh_interval_minutes: refreshIntervalMinutes,
|
|
133
|
+
...options
|
|
134
|
+
};
|
|
135
|
+
// Filter undefined values
|
|
136
|
+
Object.keys(payload).forEach(key => payload[key] === undefined && delete payload[key]);
|
|
134
137
|
const response = await this.client.post('/ingest/rss', payload);
|
|
135
138
|
return response.data;
|
|
136
139
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -117,13 +117,16 @@ export class Epist {
|
|
|
117
117
|
/**
|
|
118
118
|
* Ingest a podcast RSS feed
|
|
119
119
|
*/
|
|
120
|
-
async ingestRss(url, name, refreshIntervalMinutes) {
|
|
120
|
+
async ingestRss(url, name, refreshIntervalMinutes, options) {
|
|
121
121
|
try {
|
|
122
|
-
const payload = {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
122
|
+
const payload = {
|
|
123
|
+
url,
|
|
124
|
+
name,
|
|
125
|
+
refresh_interval_minutes: refreshIntervalMinutes,
|
|
126
|
+
...options
|
|
127
|
+
};
|
|
128
|
+
// Filter undefined values
|
|
129
|
+
Object.keys(payload).forEach(key => payload[key] === undefined && delete payload[key]);
|
|
127
130
|
const response = await this.client.post('/ingest/rss', payload);
|
|
128
131
|
return response.data;
|
|
129
132
|
}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -164,11 +164,27 @@ export class Epist {
|
|
|
164
164
|
/**
|
|
165
165
|
* Ingest a podcast RSS feed
|
|
166
166
|
*/
|
|
167
|
-
async ingestRss(
|
|
167
|
+
async ingestRss(
|
|
168
|
+
url: string,
|
|
169
|
+
name?: string,
|
|
170
|
+
refreshIntervalMinutes?: number,
|
|
171
|
+
options?: {
|
|
172
|
+
max_episodes?: number;
|
|
173
|
+
start_date?: string;
|
|
174
|
+
include_keywords?: string;
|
|
175
|
+
exclude_keywords?: string;
|
|
176
|
+
}
|
|
177
|
+
): Promise<any> {
|
|
168
178
|
try {
|
|
169
|
-
const payload: any = {
|
|
170
|
-
|
|
171
|
-
|
|
179
|
+
const payload: any = {
|
|
180
|
+
url,
|
|
181
|
+
name,
|
|
182
|
+
refresh_interval_minutes: refreshIntervalMinutes,
|
|
183
|
+
...options
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
// Filter undefined values
|
|
187
|
+
Object.keys(payload).forEach(key => payload[key] === undefined && delete payload[key]);
|
|
172
188
|
|
|
173
189
|
const response = await this.client.post('/ingest/rss', payload);
|
|
174
190
|
return response.data;
|