Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

mediafire

MediaFire369Apache-2.00.1.2TypeScript support: included

A JS wrapper around the MediaFire RESTful API

mediafire, storage, backup, upload, file, sharing

readme

MediaFire JavaScript SDK

A JS wrapper around the MediaFire RESTful API

Installation

npm i mediafire

Usage

// Import the lib
import MediaFire from 'mediafire';

// Create a new session
const mf = new MediaFire();

// Authenticate future requests
await mf.authenticate('<token>');

// Retrieve user info from the API
const info = await mf.user.getInfo();

// Log the JSON results to the console
console.log('your user info:', info);