Detalhes do pacote

@neoxr/api

neoxr4.2kMIT1.5.3

Official Fetcher for Neoxr API

readme (leia-me)

Official Fetcher for Neoxr API

Module to fetch api data very easily with efficient and readable code

How to use ??

Api.neoxr([endpoint], [parameter])

Example

Here I give an example of fetching the Google Gemini Chat API with gemini-chat as endpoint and q as parameter.

const NeoxrApi = require('@neoxr/api')

// recommend making it as global variable
const Api = new NeoxrApi('https://api.neoxr.my.id/api', 'yntkts')

Api.neoxr('/gemini-chat', {
   q: 'Hai'
}).then(console.log)

// async/await version
const json = await Api.neoxr('/gemini-chat', {
   q: 'Hai'
})
console.log(json)

Result :