Skip to content

BajekekButLost/NCore-API-Wrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


npm version npm downloads paypal donate

nCore API Wrapper

⚠️ Warning This package is still in beta (v0)! Until the full release most things can and probably will change so, don't build full apps around it yet!

nCore API Wrapper is a library that makes it easy to communicate with nCore including searching, downloading torrents and much more.

Features

  • Beginner friendly 🚀
  • Custom types 🔎
  • Downloading torrents 📩
  • Customizable useragent, cookies, etc... 🤖
  • v1 and v2 API 🌎
  • CommonJS and Module support 📦
  • And much more! 🧪

Documentation 📚

In progress...

Installation ⌨️

npm

To install nCore API Wrapper, simply run the following command:

npm install ncore-api-wrapper

Usage ❓

This is a simple overview of how to set up this library with all the options. Docs coming soon...

Normal Usage

const nCore = require("ncore-api-wrapper");
const { username, password } = require("./config");
const client = new nCore.Client({
    cookies: new nCore.CookieManager().addCookiesFromString("Your Cookies"), //Log in with cookies
});

client.on("ready", async () => {
    const torrent = await client.getTorrent(1490740);
    console.log(torrent.title); //Le.fabuleux.destin.d.Amelie.Poulain.2001.1080p.BluRay.DD5.1.x264.HuN-LiLBOX
    await torrent.download("Amelie csodálatos élete.torrent"); //Downloads torrent and creates a file with the specified path
});

client.login(username, password); //Log in with username & password

Compact Usage

const { Client } = require("ncore-api-wrapper");
const { username, password } = require("./config");
new Client()
    .on("ready", async (client) => {
        console.log((await client.getTorrent(1490740)).title); //Le.fabuleux.destin.d.Amelie.Poulain.2001.1080p.BluRay.DD5.1.x264.HuN-LiLBOX
    })
    .login(username, password); //Log in with username & password

Async Usage

const { Client } = require("ncore-api-wrapper");
const { username, password } = require("./config");

(async () => {
    const client = await new Client().login(username, password); //Log in with username & password

    const torrent = await client.getTorrent(1490740); //Get torrent by ID
    console.log(torrent.title); //Le.fabuleux.destin.d.Amelie.Poulain.2001.1080p.BluRay.DD5.1.x264.HuN-LiLBOX
})();

Plans 📝

  • Torrent page parsing to JSON
  • Custom URL Query Manager
  • Custom Cookie Manager
  • Cookie Login
  • Communicating with /ajax.php
  • Ajax response parsing to JSON
  • Torrent downloading
  • v2 Search System
  • v1 Search System
  • User class instead of string usernames

Credits 🔎


About

An ease-to-use wrapper for the non-existent nCore API

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published