bibliogram/src/lib/structures/User.js

22 lines
431 B
JavaScript
Raw Normal View History

2020-01-12 12:50:21 +00:00
const Timeline = require("./Timeline")
require("../testimports")(Timeline)
class User {
/**
* @param {import("../types").GraphUser} data
*/
constructor(data) {
this.data = data
this.following = data.edge_follow.count
this.followedBy = data.edge_followed_by.count
this.posts = data.edge_owner_to_timeline_media.count
this.timeline = new Timeline(this)
}
export() {
return this.data
}
}
module.exports = User