3.0.6 • Published 2 years ago

@midowo/t-api.js v3.0.6

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Discord

T-API Wrapper

This package is the easiest way to interact with the T-API.

Features

  • 🚀 Easy to use!
  • 🎓 From a professional API!
  • 🎇 Asynchronous
  • 🎠 Sexy developers (Dialber & Mid)

Install

npm i @midowo/t-api.js

All endpoints are from: T-API

Usage

const TAPI = require('@midowo/t-api.js')
const api = new TAPI.All('YOUR_API_KEY')

api.image.supreme({
"text": "Cool"
}).then(buffer => {
// do anything
})

api.json.translate({
"source": "auto",
"target": "fr",
"text": "Hello world!"
}).then(obj => {
// do anything
})

Connecting with Aoi.js

// Setup the aoi.js bot
const aoijs = require("aoi.js")

const bot = new aoijs.Bot({...})
// Setup the T-API
const TAPI = require('@midowo/t-api.js')
const api = new TAPI.All('YOUR_API_KEY')
// Connect with Aoi.js
const ApiUtil = new TAPI.Util(api)
ApiUtil.connect_aoi(bot, {
    embeds: '$imageAPI',
    attachments: '$attachmentAPI',
    objects: '$requestAPI',
    result: '$getProperty'
})

Methods

Validate key:

api.isValidKey(key=this.key) // default this.key
 .then(console.log) // true or false

Http get:

api.get('url', headerAuth=true).then(data => {
    data // buffer or object depending ur request
})
2.0.2

2 years ago

2.0.5

2 years ago

2.0.6

2 years ago

3.0.3

2 years ago

3.0.2

2 years ago

3.0.1

2 years ago

3.0.6

2 years ago

3.0.5

2 years ago

3.0.0

2 years ago

1.2.0

2 years ago

1.1.9

2 years ago

1.1.8

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

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