3.0.0 • Published 4 years ago
socialmanager v3.0.0
Social Manager
- A Simple Module to Manage Your Own Social Media Data
Warning
Warning: Module Is In Beta Stages
Topic
Installing
- Install Using NPM
npm i --save socialmanager- Installing Using Yarn
yarn add socialmanagerClient
- Creating A Client
const { Client } = require("socialmanager")
const client = new Client()createAccount
/**
* @String {id: string}
* @String {email: string}
* @String {password: string}
* */
client.createAccount(`SomeID` , `SomeEmail` , `SomePassword`)addMessage
/**
* @String {id}
* @String {message}
* */
client.addMessage(`SomeID`, `SomeMessage`)addFriend
/**
* @String {fromId}
* @String {toId}
* */
client.addFriend(`FromId` , `ToId`)getLastMessage
/**
* @String {id}
* */
client.getLastMessage(`SomeID`)deleteUserMessage
/**
* @String {id}
* @String {message}
* */
client.deleteUserMessage(`SomeID`, `SomeMessage`)Utils
const { Utils } = require("socialmanager")
const util = new Utils()isFriend
/**
* @String {fromId}
* @String {toId}
* */
util.isFriend(`FromId` , `ToId`)userMessageCount
/**
* @String {id}
* */
util.userMessageCount(`SomeID`)userFriendCount
/**
* @String {id}
* */
util.userFriendCount(`SomeID`)cleanMessage
util.cleanMessage(`f*ck you`) // Changes it to ****- Add Custom Words
util.cleanMessage(`f*ck you`, ['words']) API
const { API } = require('socialmanager')
const api = new API({
port: Number;
rateLimit: Boolean;
rateLimitOptions:{
windowMs: Number
max: Number
message: String
statusCode: Number
}
})mainEndpoint
api.mainEndpoint("/api")- If You want More Data To Be show On the Endpoint
api.mainEndpoint("/api", , additionalData)express
api.Express()Database
- Refer Quick.db for more information.