Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -342,4 +342,8 @@ ASALocalRun/
.mfractor/

# Local History for Visual Studio
.localhistory/
.localhistory/

# Generated TypeDoc documentation
docs/

21 changes: 14 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
# fluxpoint-js

Fluxpoint-JS is the offical Fluxpoint JavaScript api library built for the fluxpoint api!
https://fluxpoint.dev
Fluxpoint-JS is the offical Fluxpoint JavaScript api library
built for the fluxpoint api!
<https://fluxpoint.dev>

## Docs
https://fluxpointdev.github.io/fluxpoint-js/

# JavaScript
[https://fluxpointdev.github.io/fluxpoint-js/](https://fluxpointdev.github.io/fluxpoint-js/)

## JavaScript

```js
const { FluxpointClient } = require("fluxpoint-js");
const client = new FluxpointClient({
Expand All @@ -21,7 +24,9 @@ main().catch((e) => {
console.log(e);
});
```
# TypeScript

## TypeScript

```ts
import { FluxpointClient, IResponse, IErrorResponse } from "fluxpoint-js";

Expand All @@ -35,8 +40,10 @@ main().catch((e: IErrorResponse) => {
console.log(e);
});
```
# CoffeeScript
```coffee

## CoffeeScript

```coffeescript
{ FluxpointClient } = require "fluxpoint-js"
client = new FluxpointClient { token: "token" }

Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
"doc": "typedoc"
},
"devDependencies": {
"prettier": "^3.6.2",
"ts-node": "^10.7.0",
"ts-node-dev": "^1.1.8",
"typedoc": "^0.28.14",
"typescript": "^4.6.4"
},
"dependencies": {
Expand Down
4 changes: 0 additions & 4 deletions src/structures/Animal/Animal.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,27 @@ class Animal {
}
async getCat() {
return await this.#client.request.req({
type: "API",
method: "GET",
endpoint: "/sfw/img/cat",
});
}

async getDog() {
return await this.#client.request.req({
type: "API",
method: "GET",
endpoint: "/sfw/img/dog",
});
}

async getDuck() {
return await this.#client.request.req({
type: "API",
method: "GET",
endpoint: "/sfw/img/duck",
});
}

async getLizard() {
return await this.#client.request.req({
type: "API",
method: "GET",
endpoint: "/sfw/img/lizard",
});
Expand Down
4 changes: 0 additions & 4 deletions src/structures/Color/Color.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,27 @@ class Color {
}
async random() {
return await this.#client.request.req({
type: "API",
method: "GET",
endpoint: "/color/random",
});
}

async getHex(hex) {
return await this.#client.request.req({
type: "API",
method: "GET",
endpoint: `/color/info?hex=${hex}`,
});
}

async getRGB(rgb) {
return await this.#client.request.req({
type: "API",
method: "GET",
endpoint: `/color/info?rgb=${rgb}`,
});
}

async getName(name) {
return await this.#client.request.req({
type: "API",
method: "GET",
endpoint: `/color/info?name=${name}`,
});
Expand Down
2 changes: 0 additions & 2 deletions src/structures/Convert/Convert.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ class Convert {
}
async htmlToMarkdown(options = { html: "" }) {
return await this.#client.request.req({
type: "API",
method: "POST",
endpoint: "/convert/html-markdown",
data: {
Expand All @@ -16,7 +15,6 @@ class Convert {

async markdownToHTML(options = { markdown: "" }) {
return await this.#client.request.req({
type: "API",
method: "POST",
endpoint: "/convert/markdown-html",
data: {
Expand Down
6 changes: 1 addition & 5 deletions src/structures/Image/Image.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,20 @@ class Images {
}
async generateTemplate(template) {
return await this.#client.request.req({
type: "API",
method: "GET",
endpoint: `/gen/${template}`,
});
}

async generate() {
return await this.#client.request.req({
type: "API",
method: "GET",
endpoint: "/gen/html",
});
}

async generateCustom() {
return await this.#client.request.req({
type: "API",
method: "GET",
endpoint: "/gen/custom",
});
Expand All @@ -38,10 +35,9 @@ class Images {
color_welcome: "",
color_username: "",
color_members: "",
}
},
) {
const r = await this.#client.request.req({
type: "API",
method: "POST",
endpoint: "/gen/welcome",
data: {
Expand Down
3 changes: 0 additions & 3 deletions src/structures/List/List.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,20 @@ class List {
}
async getTemplates() {
return await this.#client.request.req({
type: "API",
method: "GET",
endpoint: "/list/templates",
});
}

async getBanners() {
return await this.#client.request.req({
type: "API",
method: "GET",
endpoint: "/list/banners",
});
}

async getIcons() {
return await this.#client.request.req({
type: "API",
method: "GET",
endpoint: "/list/icons",
});
Expand Down
3 changes: 0 additions & 3 deletions src/structures/Meme/Meme.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,20 @@ class Meme {
}
async getMeme() {
return await this.#client.request.req({
type: "API",
method: "GET",
endpoint: "/sfw/img/meme",
});
}

async getNou() {
return await this.#client.request.req({
type: "API",
method: "GET",
endpoint: "/sfw/img/nou",
});
}

async getPog() {
return await this.#client.request.req({
type: "API",
method: "GET",
endpoint: "/sfw/img/pog",
});
Expand Down
3 changes: 0 additions & 3 deletions src/structures/Minecraft/Minecraft.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,20 @@ class Minecraft {
}
async getPing(options = { host: "" | 0, port: "" | 25565 | "25565" }) {
return await this.#client.request.req({
type: "API",
method: "GET",
endpoint: `/mc/ping?host=${options.host}?port=${options.port}`,
});
}

async getPingByHost(host) {
return await this.#client.request.req({
type: "API",
method: "GET",
endpoint: `/mc/ping?host=${host}`,
});
}

async getSkin(playerName, type = "head" | "cube" | "body" | "full" | "all") {
return await this.#client.request.req({
type: "API",
method: "GET",
endpoint: `/mc/skin?player=${playerName}${type ? `?type=${type}` : ""}`,
});
Expand Down
2 changes: 0 additions & 2 deletions src/structures/Misc/Misc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@ class Misc {
}
async getDadJoke() {
return await this.#client.request.req({
type: "API",
method: "GET",
endpoint: "/dadjoke",
});
}

async getMe() {
return await this.#client.request.req({
type: "API",
method: "GET",
endpoint: "/me",
});
Expand Down
Loading