floatplane
v4.5.2
Published
Library for interfacing with the LMG Floatplane.com api
Downloads
117
Readme
Unofficial Floatplane API
This library is not in any way related to LMG or Floatplane Media Inc.
Features/Endpoints are added as needed so if something is missing please make a Issue or fork, add it yourself and Pull Request
Install
$ npm install floatplane
Types & Docs
This library uses & collaborates with the Floatplane API Specification which has full documentation for most Floatplane endpoints including ones this library has not yet implemented.
Example Usage
import { Floatplane } from "./index.js";
const floatplane = new Floatplane(); // Create a new API instance.
// login -> User object
const { user } = await floatplane.login({
username: "yourUsername",
password: "yourPassword",
token: "yourTokenIfYouUse2Factor",
});
console.log(user);
// Fetch User subscriptions
const subs = await floatplane.user.subscriptions();
// 20 Latest videos from first subscription
const videos = await floatplane.creator.blogPosts(subs[0].creator, { hasVideo: true });
// Fetch all videos asynchronously
for await (const video of floatplane.creator.blogPostsIterable(subs[0].creator, { hasVideo: true })) {
console.log(video);
}
Individual classes can also be imported seperately:
import { Auth } from "floatplane/auth";
Projects
The following projects use this library: