1.0.3 • Published 2 years ago

uptobox-ts v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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.

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago