podverse-external-services 5.1.1-alpha.5 → 5.1.1-alpha.7
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/config/index.d.ts +0 -3
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +0 -3
- package/dist/services/podcast-index/index.d.ts +1 -1
- package/dist/services/podcast-index/index.d.ts.map +1 -1
- package/dist/services/podcast-index/index.js +1 -4
- package/package.json +1 -1
package/dist/config/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;CAalB,CAAA"}
|
package/dist/config/index.js
CHANGED
|
@@ -13,8 +13,5 @@ exports.config = {
|
|
|
13
13
|
clientId: process.env.PAYPAL_CLIENT_ID || '',
|
|
14
14
|
clientSecret: process.env.PAYPAL_CLIENT_SECRET || '',
|
|
15
15
|
mode: process.env.PAYPAL_MODE || 'sandbox'
|
|
16
|
-
},
|
|
17
|
-
podcastIndex: {
|
|
18
|
-
recentlyUpdatedDataInterval: parseInt(process.env.PODCAST_INDEX_RECENTLY_UPDATED_DATA_INTERVAL || '1800', 10)
|
|
19
16
|
}
|
|
20
17
|
};
|
|
@@ -12,7 +12,7 @@ export declare class PodcastIndexService {
|
|
|
12
12
|
podcastIndexAPIRequest: (url: string, config?: any) => Promise<any>;
|
|
13
13
|
deadFeedsDownloadAndExtractCSV: () => Promise<any[]>;
|
|
14
14
|
podcastGetByGuid: (podcastGuid: string) => Promise<PodcastByGuidResponse | null>;
|
|
15
|
-
recentGetData: () => Promise<any[]>;
|
|
15
|
+
recentGetData: (sinceRange: number) => Promise<any[]>;
|
|
16
16
|
trendingGetPodcasts: (max?: number, since?: number, lang?: string, cat?: string) => Promise<{
|
|
17
17
|
feeds: any[];
|
|
18
18
|
nextSince?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/podcast-index/index.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAG9D,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AASD,qBAAa,mBAAmB;IACtB,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;gBAEZ,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,WAAW;IAQzD,sBAAsB,GAAU,KAAK,MAAM,EAAE,SAAS,GAAG,kBA0BxD;IAID,8BAA8B,QAAa,OAAO,CAAC,GAAG,EAAE,CAAC,CAwCxD;IAID,gBAAgB,GAAU,aAAa,MAAM,KAAG,OAAO,CAAC,qBAAqB,GAAG,IAAI,CAAC,CAYpF;IAID,aAAa,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/podcast-index/index.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAG9D,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AASD,qBAAa,mBAAmB;IACtB,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;gBAEZ,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,WAAW;IAQzD,sBAAsB,GAAU,KAAK,MAAM,EAAE,SAAS,GAAG,kBA0BxD;IAID,8BAA8B,QAAa,OAAO,CAAC,GAAG,EAAE,CAAC,CAwCxD;IAID,gBAAgB,GAAU,aAAa,MAAM,KAAG,OAAO,CAAC,qBAAqB,GAAG,IAAI,CAAC,CAYpF;IAID,aAAa,GAAU,YAAY,MAAM,oBA4BxC;IAID,mBAAmB,GACjB,MAAK,MAAW,EAChB,QAAQ,MAAM,EACd,OAAO,MAAM,EACb,MAAM,MAAM,KACX,OAAO,CAAC;QAAE,KAAK,EAAE,GAAG,EAAE,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAoB/C;IAID,oBAAoB,QAAa,OAAO,CAAC,MAAM,EAAE,CAAC,CAMjD;IAED,+BAA+B,GAC7B,4BAA4B,MAAM,EAAE,EAAE,gBAAW,KAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAatE;CACF"}
|
|
@@ -19,7 +19,6 @@ const csv_parser_1 = __importDefault(require("csv-parser"));
|
|
|
19
19
|
const fs_1 = __importDefault(require("fs"));
|
|
20
20
|
const path_1 = __importDefault(require("path"));
|
|
21
21
|
const podverse_helpers_1 = require("podverse-helpers");
|
|
22
|
-
const config_1 = require("@external-services/config");
|
|
23
22
|
/*
|
|
24
23
|
NOTE!!!
|
|
25
24
|
The episodeGuid needs to be encoded both on the client-side and server side if it is an http url guid.
|
|
@@ -100,10 +99,9 @@ class PodcastIndexService {
|
|
|
100
99
|
return podcastIndexPodcast || null;
|
|
101
100
|
});
|
|
102
101
|
// Recent
|
|
103
|
-
this.recentGetData = () => __awaiter(this, void 0, void 0, function* () {
|
|
102
|
+
this.recentGetData = (sinceRange) => __awaiter(this, void 0, void 0, function* () {
|
|
104
103
|
podverse_helpers_1.logger.info('recentGetData beginning...');
|
|
105
104
|
const currentTimeInSeconds = Math.floor(Date.now() / 1000);
|
|
106
|
-
const sinceRange = config_1.config.podcastIndex.recentlyUpdatedDataInterval;
|
|
107
105
|
const sinceTimeInSeconds = currentTimeInSeconds - sinceRange;
|
|
108
106
|
const fetchData = (since_1, ...args_1) => __awaiter(this, [since_1, ...args_1], void 0, function* (since, allData = []) {
|
|
109
107
|
podverse_helpers_1.logger.info(`fetchData since: ${since}, allData.length: ${allData.length}`);
|
|
@@ -140,7 +138,6 @@ class PodcastIndexService {
|
|
|
140
138
|
}
|
|
141
139
|
podverse_helpers_1.logger.info(`[PodcastIndex] Fetching trending feeds (max: ${safeMax}, since: ${since}, lang: ${lang}, cat: ${cat})`);
|
|
142
140
|
const response = yield this.podcastIndexAPIRequest(url);
|
|
143
|
-
console.log('Trending response:', response);
|
|
144
141
|
return {
|
|
145
142
|
feeds: response.feeds || [],
|
|
146
143
|
nextSince: response.nextSince
|