Comparing version 1.0.0 to 1.0.1
@@ -1,12 +0,15 @@ | ||
var bruh = require('./index.js'); | ||
var bruh = require("./index.js"); | ||
async function test() { | ||
console.log(await bruh.joke()); | ||
console.log(await bruh.tts("hello")); | ||
console.log(await bruh.spotify("339177677326123018")); | ||
console.log(await bruh.cb("hello")); | ||
console.log(await bruh.tti("hello")); | ||
console.log(await bruh.joke()); | ||
console.log(await bruh.word()); | ||
console.log(await bruh.fact()); | ||
console.log(await bruh.tti("Hello world!")); | ||
console.log(await bruh.sub("me_irl")); | ||
console.log(await bruh.taco()); | ||
console.log(await bruh.sub("memes")); | ||
console.log(await bruh.taco()); | ||
} | ||
test() | ||
test(); |
22
index.js
@@ -43,1 +43,23 @@ const snekfetch = require("snekfetch"); | ||
}; | ||
//MISC ENDPOINTS | ||
module.exports.tts = async word => { | ||
const { body } = await snekfetch | ||
.get(`https://bruhapi.xyz/tts/` + word.replace(/ /g, "%20")) | ||
.catch(err => console.log(err)); | ||
return body.url; | ||
}; | ||
module.exports.cb = async word => { | ||
const { body } = await snekfetch | ||
.get(`https://bruhapi.xyz/cb/` + word.replace(/ /g, "%20")) | ||
.catch(err => console.log(err)); | ||
return body.res; | ||
}; | ||
module.exports.spotify = async disid => { | ||
const { body } = await snekfetch | ||
.get(`https://bruhapi.xyz/spotify/` + disid) | ||
.catch(err => console.log(err)); | ||
return body.res; | ||
}; |
{ | ||
"name": "bruhapi", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Gives random jokes, words, images and more. Also has a text to image feature.", | ||
@@ -14,17 +14,23 @@ "main": "index.js", | ||
"ImageAPI", | ||
"bruhapi", | ||
"random jokes", | ||
"text to image", | ||
"text on image", | ||
"random word", | ||
"random fact", | ||
"random", | ||
"reddit", | ||
"random taco" | ||
"bruhapi", | ||
"random jokes", | ||
"text to image", | ||
"text on image", | ||
"random word", | ||
"random fact", | ||
"random", | ||
"reddit", | ||
"random taco", | ||
"discord", | ||
"spotify", | ||
"text to speech", | ||
"text-to-speech", | ||
"tts", | ||
"cleverbot" | ||
], | ||
"homepage": "https://github.com/whasonyt/bruhapi-npm#readme", | ||
"homepage": "https://bruhapi.xyz", | ||
"repository": { | ||
"type" : "git", | ||
"url" : "https://github.com/whasonyt/bruhapi-npm" | ||
}, | ||
"type": "git", | ||
"url": "https://github.com/whasonyt/bruhapi-npm" | ||
}, | ||
"author": "willm4937", | ||
@@ -31,0 +37,0 @@ "license": "GPL-3.0", |
@@ -1,30 +0,35 @@ | ||
# hello-express | ||
# 🅱 BruhAPI | ||
A server that serves a webpage, its resources, and some data | ||
Welcome to the official [BruhAPI](https://bruhapi.xyz) NPM package! This package has many things to play around with such as text to image, random jokes & facts, random subreddit images, and more! A documentation of how to use each feature can be found below. | ||
## Your Project | ||
### Initialize BruhAPI NPM | ||
`const bruh = require("bruhapi")` | ||
On the front-end, | ||
*_Each module should be wrapped in an async function._ | ||
- Edit `views/index.html` to change the content of the webpage | ||
- `public/client.js` is the javacript that runs when you load the webpage | ||
- `public/style.css` is the styles for `views/index.html` | ||
- Drag in `assets`, like images or music, to add them to your project | ||
### List of Features | ||
- `tts("text")` - text to speech | ||
- `spotify("discordID")` - get user's playing spotify song | ||
- `cb("text")` - talk to cleverbot FREE | ||
- `tti("text")` - text to image | ||
---------- | ||
- `joke()` - random joke | ||
- `word()` - random word | ||
- `fact()` - random fact | ||
---------- | ||
- `sub("sub_name")` - random image from subreddit | ||
- `taco()` - random taco image | ||
On the back-end, | ||
### Examples | ||
For more examples, check the `examples.js` file on GitHub. | ||
``` | ||
const bruh = require("bruhapi") | ||
async function test() { | ||
console.log(await bruh.joke()) | ||
} | ||
- your app starts at `server.js` | ||
- add frameworks and packages in `package.json` | ||
- safely store app secrets in `.env` (nobody can see this but you and people you invite) | ||
Click `Show` in the header to see your app live. Updates to your code will instantly deploy. | ||
## Made by [Glitch](https://glitch.com/) | ||
**Glitch** is the friendly community where you'll build the app of your dreams. Glitch lets you instantly create, remix, edit, and host an app, bot or site, and you can invite collaborators or helpers to simultaneously edit code with you. | ||
Find out more [about Glitch](https://glitch.com/about). | ||
( ᵔ ᴥ ᵔ ) | ||
test() | ||
``` | ||
-------------------- | ||
If you have any questions, **please join our [Discord server](https://willm.xyz/discord)**! |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5681
74
35
9
2