### Example Usage: Add Magnet and Get Videos Source: https://github.com/theabbie/seedr-api/blob/main/README.md A comprehensive example demonstrating the typical workflow: logging in, adding a magnet link, and then retrieving the downloaded video contents. ```javascript var Seedr = require("seedr"); var seedr = new Seedr(); await seedr.login("email@example.com","password"); await seedr.addMagnet("magnet_link"); // Starts downloading, wait till that happens var contents = await seedr.getVideos(); // An object containing list of all files and folders ``` -------------------------------- ### Login with Username and Password Source: https://github.com/theabbie/seedr-api/blob/main/README.md Logs into Seedr.cc using email and password, returning a short-lived token. This is a common method for initial authentication. ```javascript var Seedr = require("seedr"); var seedr = new Seedr(); await seedr.login("email@example.com","password"); ``` -------------------------------- ### Add Magnet Link for Download Source: https://github.com/theabbie/seedr-api/blob/main/README.md Adds a magnet link to Seedr.cc for downloading. The function initiates the download process, and the user should wait for it to complete. ```javascript var Seedr = require("seedr"); var seedr = new Seedr(); await seedr.login("email@example.com","password"); await seedr.addMagnet("magnet_link"); // adds a magnet link, wait till it downloads ``` -------------------------------- ### Login with Device Code Source: https://github.com/theabbie/seedr-api/blob/main/README.md Initiates the device code login flow by retrieving a device code and user code. Users must then visit seedr.cc/devices to authorize the login. This method provides a token with a 1-year lifetime. ```javascript var Seedr = require("seedr"); var seedr = new Seedr(); await seedr.getDeviceCode(); // prints a device code and user code, go to seedr.cc/devices and add user code // after adding user code, pass the device code parameter to getToken function await seedr.getToken("device_code"); // returns a token with 1 year lifetime ``` -------------------------------- ### Login with Existing Token Source: https://github.com/theabbie/seedr-api/blob/main/README.md Directly logs into Seedr.cc using a previously obtained token. This is useful for re-authenticating without going through the full login process. ```javascript var Seedr = require("seedr"); var seedr = new Seedr(); await seedr.addToken("token"); ``` -------------------------------- ### Retrieve Video Contents Source: https://github.com/theabbie/seedr-api/blob/main/README.md Fetches a list of all files and folders available in the user's Seedr.cc account. The output is an array of arrays, where each inner array contains file objects with their IDs and names. ```javascript var Seedr = require("seedr"); var seedr = new Seedr(); await seedr.login("email@example.com","password"); await seedr.getVideos(); /* Prints Array of Arrays with file data [ [ { "fid": 124291671, // folder id "id": 636235280, // file id "name": "File Name" }, ... ], ... ] */ ``` -------------------------------- ### Delete File or Folder Source: https://github.com/theabbie/seedr-api/blob/main/README.md Provides functions to delete specific files or entire folders from Seedr.cc. The `deleteFile` function requires a file ID, while `deleteFolder` requires a folder ID. ```javascript var Seedr = require("seedr"); var seedr = new Seedr(); await seedr.login("email@example.com","password"); await seedr.deleteFile("file_id"); await seedr.deleteFolder("folder_id"); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.