https://github.com/inrixia/floatplaneapi.ts
Library for interfacing with the LMG Floatplane.com api
https://github.com/inrixia/floatplaneapi.ts
api api-client floatplane floatplane-club floatplane-media
Last synced: 7 months ago
JSON representation
Library for interfacing with the LMG Floatplane.com api
- Host: GitHub
- URL: https://github.com/inrixia/floatplaneapi.ts
- Owner: Inrixia
- Created: 2020-09-05T01:26:38.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2024-04-01T07:50:38.000Z (about 1 year ago)
- Last Synced: 2024-11-19T21:05:19.148Z (7 months ago)
- Topics: api, api-client, floatplane, floatplane-club, floatplane-media
- Language: TypeScript
- Homepage:
- Size: 2.28 MB
- Stars: 7
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
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](https://github.com/Inrixia/floatplaneAPI.ts/issues/new) or fork, add it yourself and [Pull Request](https://github.com/Inrixia/floatplaneAPI.ts/pulls)
### Install
`$ npm install floatplane`
### Types & Docs
This library uses & collaborates with the **[Floatplane API Specification](https://github.com/Jman012/FloatplaneAPI)** which has full **[documentation](https://jman012.github.io/FloatplaneAPIDocs/)** for most Floatplane endpoints including ones this library has not yet implemented.
### Example Usage
```ts
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:
```ts
import { Auth } from "floatplane/auth";
```
## Projects
The following projects use this library:
### [Floatplane Downloader](https://github.com/Inrixia/Floatplane-Downloader)