uptobox-ts
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

Uptobox-TS

MIT License NPM Version Author

A Node library allowing to use uptobox APIs easily.

Installation

Use the package manager npm to install.

npm install uptobox-ts

Usage

import { UptoboxApi, Uptobox } from 'uptobox-ts';

Quick Example

Download a file

import { UptoboxApi, Uptobox } from 'uptobox-ts';

Uptobox.setToken(TOKEN); // User token provided by Uptobox

// Will download the file (premium or non-premium) in the current folder
await uptobox.downloadFile('https://uptobox.com/XXXXXXXXXXXX')

Get the remaining time to download

import { UptoboxApi, Uptobox } from 'uptobox-ts';

// Will return the remaining time for account's users
await uptobox.getRemainingTime('https://uptobox.com/XXXXXXXXXXXX')
// Will return the remaining time for guest users
await uptobox.getRemainingTime('https://uptobox.com/XXXXXXXXXXXX', false)

APIs

getWaitingToken

import { UptoboxApi } from 'uptobox-ts';

// Password is optionnal
await UptoboxApi.getWaitingToken(token, fileCode, password?)

Premium users get the download link directly

getDownloadLink

import { UptoboxApi } from 'uptobox-ts';

// For non-premium users
await UptoboxApi.getDownloadLink(token, fileCode, waitingToken)

getFilesInfo

import { UptoboxApi } from 'uptobox-ts';

await UptoboxApi.getFilesInfo(fileCodeOne, fileCodeTwo, ...);

getUserData

import { UptoboxApi } from 'uptobox-ts';

await UptoboxApi.getUserData(token);

Features

  • Download a file
  • Retrieve the remaining time for the download
  • More features to come in the future

APIs checklist

License

Distributed under the MIT License. See LICENSE for more information.

Readme

Keywords

Package Sidebar

Install

npm i uptobox-ts

Weekly Downloads

0

Version

1.0.3

License

MIT

Unpacked Size

31.1 kB

Total Files

17

Last publish

Collaborators

  • paypito