0.0.25 • Published 10 months ago

@flaresocial/api v0.0.25

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

@flaresocial/api

Flare Social API wrapper for javascript.

Installation

npm install --save @flaresocial/api
# or
yarn add @flaresocial/api
# or
pnpm add @flaresocial/api
# or
bun add @flaresocial/api

Usage

// Import the module
import FlareApi from "@flaresocial/api";

// get your token by creating an app, when for calling the api as a user account
// you can get it by logging in or registering
const token = FlareApi.login("usernameOrEmail", "password" /* baseUrl: string */);
// or
const _token = FlareApi.register("username", "email", "password", "Display Name", /* baseUrl: string */); // Display Name is optional

// create a new FlareApi instance:
const flare = new FlareApi(() => token /* baseUrl: string */);

// get the user's profile
const me = await flare.users.getMe();

// get all users
const users = await flare.users.getAll();

// get a user by id
const user = await flare.users.getById(me.id); // or any other user id

License

This project is licensed under the MIT License

0.0.25

10 months ago

0.0.24

12 months ago

0.0.23

12 months ago

0.0.22

12 months ago

0.0.21

12 months ago

0.0.20

12 months ago

0.0.19

12 months ago

0.0.18

12 months ago

0.0.17

12 months ago

0.0.16

12 months ago

0.0.15

12 months ago

0.0.14

12 months ago

0.0.13

12 months ago

0.0.12

12 months ago

0.0.10

12 months ago

0.0.9

12 months ago

0.0.8

12 months ago

0.0.7

12 months ago

0.0.6

12 months ago

0.0.5

12 months ago

0.0.4

12 months ago

0.0.3

12 months ago

0.0.2

12 months ago

0.0.1

12 months ago