# uptobox-ts

> A Node library allowing to use uptobox APIs easily.

Latest version **1.0.3** (published 2022-03-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install uptobox-ts
pnpm add uptobox-ts
yarn add uptobox-ts
bun add uptobox-ts
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2022-03-25 |
| First published | 2022-03-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 30.4 KB |
| Known vulnerabilities | 0 (+23 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Paypito |
| Maintainers | paypito |
| Keywords | Uptobox, API, Download |

## Links

- npm: https://www.npmjs.com/package/uptobox-ts
- Repository: https://github.com/Paypito/uptobox-ts
- Homepage: https://github.com/Paypito/uptobox-ts#readme
- Issues: https://github.com/Paypito/uptobox-ts/issues
- npm.io page: https://npm.io/package/uptobox-ts

## Dependencies (2)

- [axios](https://npm.io/package/axios.md) ^0.26.0
- [cheerio](https://npm.io/package/cheerio.md) ^1.0.0-rc.10

## Recent versions

- 1.0.3 (latest) — 2022-03-25
- 1.0.2 — 2022-03-05
- 1.0.1 — 2022-03-05

## README

# Uptobox-TS
![MIT License](https://img.shields.io/apm/l/atomic-design-ui.svg?)
[![NPM Version](https://badgen.net/npm/v/uptobox-ts)](https://www.npmjs.com/package/uptobox-ts)
![Author](https://img.shields.io/badge/author-Paypito-red)

A Node library allowing to use uptobox APIs easily.

## Installation

Use the package manager [npm](https://www.npmjs.com/) to install.

```bash
npm install uptobox-ts
```

## Usage

```typescript
import { UptoboxApi, Uptobox } from 'uptobox-ts';
```

## Quick Example
### Download a file
```typescript
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
```typescript
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](https://docs.uptobox.com/#get-a-waiting-token)
```typescript
import { UptoboxApi } from 'uptobox-ts';

// Password is optionnal
await UptoboxApi.getWaitingToken(token, fileCode, password?)
```
_Premium users get the download link directly_
### [getDownloadLink](https://docs.uptobox.com/#get-the-download-link)
```typescript
import { UptoboxApi } from 'uptobox-ts';

// For non-premium users
await UptoboxApi.getDownloadLink(token, fileCode, waitingToken)
```
### [getFilesInfo](https://docs.uptobox.com/#retrieve-file-informations)
```typescript
import { UptoboxApi } from 'uptobox-ts';

await UptoboxApi.getFilesInfo(fileCodeOne, fileCodeTwo, ...);
```
### [getUserData](https://docs.uptobox.com/#retrieve-user-data)
```typescript
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
  - [x] [getWaitingToken](https://docs.uptobox.com/#get-a-waiting-token)
  - [x] [getDownloadLink](https://docs.uptobox.com/#get-the-download-link)
  - [x] [getFilesInfo](https://docs.uptobox.com/#retrieve-file-informations)
  - [x] [getUserData](https://docs.uptobox.com/#retrieve-user-data)
  - [ ] [enableSSLDownload](https://docs.uptobox.com/#ssl-download)
  - [ ] [enableDirectDownload](https://docs.uptobox.com/#direct-download)
  - [ ] [enableSecurityLock](https://docs.uptobox.com/#security-lock)
  - [ ] [convertPoint](https://docs.uptobox.com/#point-conversion)
  - [ ] [createVoucher](https://docs.uptobox.com/#create-voucher)
  - [ ] [getFolderContent](https://docs.uptobox.com/#retrieve-files-in-public-folder)
  - [ ] [getFilesAndFolders](https://docs.uptobox.com/#retrieve-files-and-folders)
  - [ ] [updateFileInfo](https://docs.uptobox.com/#update-file-informations)
  - [ ] [updateFilesInfo](https://docs.uptobox.com/#update-multiple-file-39-s-public-option)
  - [ ] [moveFolder](https://docs.uptobox.com/#move-a-folder-to-another-location)
  - [ ] [moveFiles](https://docs.uptobox.com/#move-one-or-multiple-files-to-another-location)
  - [ ] [copyFiles](https://docs.uptobox.com/#copy-one-or-multiple-files-to-another-location)
  - [ ] [renameFolder](https://docs.uptobox.com/#rename-a-folder)
  - [ ] [createFolder](https://docs.uptobox.com/#create-a-folder)
  - [ ] [deleteFiles](https://docs.uptobox.com/#delete-one-or-multiple-files)
  - [ ] [deleteFolder](https://docs.uptobox.com/#delete-a-folder)
  - [ ] [getUploadLink](https://docs.uptobox.com/#retrieve-an-upload-url)
## License
Distributed under the MIT License. See LICENSE for more information.

---
_Source: https://npm.io/package/uptobox-ts · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
