UNPKG

marsy.js

Version:

Marsy.Live için tasarlanmış bir API yönetim uygulamasıdır. Bu modül ise kolay bir şekilde kullanımını sağlamaktadır.

31 lines (27 loc) 759 B
const Client = require("../bin/Client"); const User = require("./User"); class Users { /** * * @param {Client} client */ constructor(client) { this.client = client; } /** * Bir kullanıcıyı detaylı sorgulamak için kullanılır! * @param {String} userId * @param {Boolean} message * @returns { User } */ fetch(userId, message = false) { return this.client._rest._get("@/leaderboard/user/" + userId + `${message ? `?_message=true` : ``}`, "POST").then(a => { if(a) { return new User(a.Data, this.client) } else { return null; } }) } } module.exports = Users;