npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

premiumize-me-api

v1.0.5

Published

A simple NodeJS-Wrapper for the official Premiumize.me API

Downloads

18

Readme

PremiumizeMeAPI

NPM Version NPM All Releases

Description

A simple JS-Wrapper for the official PremiumizeMe-API.

Features

  • Includes all official API-Calls
  • Works with NodeJS Version 12.4.0 or higher
  • Uses Promises to return the json data
  • Supports .nzb and .torrent files to create a transfer
  • Authentication through an API-Key

Install

npm install premiumize-me-api

Usage

Node

const PremiumizeMeAPI = require('premiumize-me-api')

let testAPI = new PremiumizeMeAPI("YOUR_API_KEY");

getFolderList(String folder_id)

testAPI.getFolderList(folder_id).then(console.log);

The result for the getFolderList() command looks like this:

{
  "status": "string",
  "content": [
    {
      "id": "string",
      "name": "string",
      "type": "file",
      "size": 0,
      "created_at": 0,
      "link": "string",
      "stream_link": "string",
      "breadcrumbs": [
        {
          "id": "string",
          "name": "string",
          "parent_id": "string"
        }
      ]
    }
  ],
  "name": "string",
  "parent_id": "string"
}

createFolder(String folder_name, String parent_id)

testAPI.createFolder(folder_name, parent_id).then(console.log)

The result for the createFolder() command looks like this:

{
  "status": "success",
  "id": "string"
}

renameFolder(String folder_id, String folder_name)

testAPI.renameFolder(folder_id, folder_name).then(console.log)

The result for the renameFolder() command looks like this:

{
  "status": "success",
  "message": "string"
}

pasteToFolder(String folder_id, String|String[] toPasteFolderIds, String|String[] toPasteFileIds)

testAPI.pasteToFolder(folder_id, toPasteFolderIds, toPasteFileIds).then(console.log);

The result for the pasteToFolder() command looks like this:

{
  "status": "success",
  "message": "string"
}

deleteFolder(String folder_id)

testAPI.deleteFolder(folder_id).then(console.log);

The result for the deleteFolder() command looks like this:

{
  "status": "success",
  "message": "string"
}

uploadToFolder(String folder_id)

testAPI.uploadToFolder(folder_id).then(console.log);

The result for the uploadToFolder() command looks like this:

{
  "status": "success",
  "token": "string",
  "url": "string"
}

deleteFile(String file_id)

testAPI.deleteFile(file_id).then(console.log);

The result for the deleteFile() command looks like this:

{
  "status": "success",
  "message": "string"
}

renameFile(String file_id, String file_name)

testAPI.renameFile(file_id, file_name).then(console.log);

The result for the renameFile() command looks like this:

{
  "status": "success",
  "message": "string"
}

fetchFileDetails(String file_id)

testAPI.fetchFileDetails(file_id).then(console.log);

The result for the fetchFileDetails() command looks like this:

{
  "id": "string",
  "name": "string",
  "type": "file",
  "size": 0,
  "created_at": 0,
  "folder_id": "string",
  "link": "string",
  "stream_link": "string"
}

createTransfer(String|ReadStream src_address_file, String folder_id)

testAPI.createTransfer(src_address_file, folder_id).then(console.log);

The result for the createTransfer() command looks like this:

{
  "status": "success",
  "id": "string",
  "name": "example.jpg"
}

createDirectDownload(String src_address)

testAPI.createDirectDownload(src_address).then(console.log);

The result for the createDirectDownload() command looks like this:

{
  "status": "success",
  "location": "https://server.com/path/file.ext",
  "filename": "file.ext",
  "filesize": 123123123,
  "content": [
    {
      "path": "folder/file1.jpg",
      "size": 123123123,
      "link": "https://server.com/path/file.ext",
      "stream_link": "https://server.com/path/file.ext",
      "transcode_status": "finished"
    }
  ]
}

getTransferList()

testAPI.getTransferList().then(console.log);

The result for the getTransferList() command looks like this:

{
  "status": "string",
  "transfers": [
    {
      "id": "string",
      "name": "string",
      "message": "string",
      "status": "waiting",
      "progress": 0,
      "target_folder_id": "string",
      "folder_id": "string",
      "file_id": "string"
    }
  ]
}

clearTransferList()

testAPI.clearTransferList().then(console.log);

The result for the clearTransferList() command looks like this:

{
  "status": "success",
  "message": "string"
}

deleteTransfer(String transfer_id)

testAPI.deleteTransfer(transfer_id).then(console.log);

The result for the deleteTransfer() command looks like this:

{
  "status": "success",
  "message": "string"
}

getAccountInfo()

testAPI.getAccountInfo().then(console.log);

The result for the getAccountInfo() command looks like this:

{
  "status": "success",
  "customer_id": 0,
  "premium_until": 0,
  "limit_used": 0,
  "space_used": 0
}

createZipDownload(String|String[] file_id, String|String[] folder_id)

testAPI.createZipDownload(file_id, folder_id).then(console.log);

The result for the createZipDownload() command looks like this:

{
  "status": "success",
  "location": "string"
}

checkHosterAvailability(String|String[] src_address)

testAPI.checkHosterAvailability(src_address).then(console.log);

The result for the checkHosterAvailability() command looks like this:

{
  "status": "success",
  "response": [
    true
  ],
  "transcoded": [
    true
  ],
  "filename": [
    "string"
  ],
  "filesize": [
    "string"
  ]
}

getServiceList()

testAPI.getServiceList().then(console.log);

The result for the getServiceList() command looks like this:

{
  "directdl": [
    "string"
  ],
  "cache": [
    "string"
  ],
  "fairusefactor": {
    "service": 0
  },
  "aliases": {
    "service": [
      "string"
    ]
  },
  "regexpatterns": {
    "service": [
      "string"
    ]
  }
}

License

MIT