Skip to content

Commit

Permalink
Bump raindrop-api and adjust
Browse files Browse the repository at this point in the history
  • Loading branch information
thevops committed Jun 28, 2024
1 parent 1b33602 commit 2ad3689
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
Binary file modified bun.lockb
Binary file not shown.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dependencies": {
"js-yaml": "^4.1.0",
"rss-parser": "^3.13.0",
"raindrop-api": "https://github.com/thevops/raindrop-api#v1.0.0",
"raindrop-api": "https://github.com/thevops/raindrop-api#v1.1.0",
"simple-fmt-logger": "https://github.com/thevops/simple-fmt-logger#v1.1.3"
}
}
12 changes: 8 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { RaindropItem } from "raindrop-api";
import { logger, Config, raindropAPI } from "./config";
import { getNewerYouTubeVideos } from "./youtube";

Expand Down Expand Up @@ -25,10 +26,13 @@ async function main() {
logger.debug(`Found ${new_videos.length} new videos`);
for (const video of new_videos) {
logger.info(`Adding video to Raindrop: ${video.link}`);
const res = await raindropAPI.addItem_link(
Config.raindrop_collection_id,
video.link,
);
const item: RaindropItem = {
link: video.link,
collection: {
$id: Number(Config.raindrop_collection_id),
}
}
const res = await raindropAPI.addItem(item);
if (res) {
logger.info("Video added successfully");
} else {
Expand Down

0 comments on commit 2ad3689

Please sign in to comment.