sesame-api
v2.0.0
Published
A package for use Sesame API in NodeJS
Downloads
10
Maintainers
Readme
Sesame API Package
This package was created by Naflouille Creations.
Instructions for use
*Documentation will be available on SesAPI shortly.
Installing the package
To install this package, you first need to have NodeJS and NPM installed. Then you can install the package.
npm install sesame-api
To use the Sesame API, you must first define sesame in your NodeJS script
const sesame = require("sesame-api");
Once this is done, you can use the API functions to search the Sesame database.
Usage/Examples
const sesame = require("sesame-api");
let data = sesame.search.SearchInDatabase("Rithy", "users");
console.log(data);
The data
variable normally contains :
[
{
name: 'Rithy',
description: 'A guy.',
links: [...],
about: {
isStaff: false,
isModder: false,
isUCP: false,
isContrib: false,
isSesame: true
},
sesameID: 'usr-RTY-bDEO1zR7Gx',
templateImage: 'https://github.com/rithyn/rithy-archive/blob/main/pictures/ucp/rithy.png?raw=true'
}
]
The search function is normally sesame.search.SearchInDatabase(KEYWORDS, TYPE);
TYPE
can be "users"
, "ships"
, "mods"
, "codes"
and "communities"
.
KEYWORDS
is your keyword.