@neoxr/api
v1.5.3
Published
Official Fetcher for Neoxr API
Downloads
5,212
Readme
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 :