JSPM

socialmanager

3.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q18573F
  • License BSL-1.0

A Simple Module To Make A Social Media

Package Exports

  • socialmanager
  • socialmanager/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (socialmanager) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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 socialmanager

Client

  • 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