1.1.1 • Published 2 years ago

fakeyou.js v1.1.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
2 years ago

fakeyou.js is a powerful Node.js module that allows you to interact with the FakeYouAPI easily.

Features

Examples

Login or use your token

const FakeYou = require('fakeyou.js');
const fy = new FakeYou.Client({
    token: 'anOptionalSecretToken',
    usernameOrEmail: 'anOptionalCoolUsernameOrEmail',
    password: 'anOptionalSuperSecretPassword'
});
await fy.start(); //required

Search models

let models = fy.searchModel('mario');
models.first();

Make TTS Request

await fy.makeTTS('mario', 'A cool text to speech');
//or
let model = fy.searchModel('mario').first();
if(model) {
    await model.request('A cool text to speech');
}

LeaderBoard

let lb = await fy.leaderboard();
lb.getPosition(3, true);

Edit client user

await fy.user.edit({
    description: 'Another **random** user in FakeYou',
    twitter: null,
    github: 'a-cool-username',
    ttsVisibility: false
});

Get all data from an entity

await fy.models.fetch('TM:7wbtjphx8h8v');
//or
await fy.fetchUser('acoolusername');
//or
let result = fy.results.cache.get('TR:tn7gq96wg6httvnq91y4y9fka76nj');
if(result) {
    await result.fetch()
}

Useful links

1.1.1

2 years ago

1.1.0

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago