-
Notifications
You must be signed in to change notification settings - Fork 1
Sort Object
VeguiDev edited this page Sep 16, 2022
·
1 revision
This object is used to tell the API how you want to order the response. For example if you want me to get the most downloaded resources.
Index:
must: Can be most or least.
field: Its the name of the property that will be evaluated. (Example: downloads)
{
"must": "most",
"field": "downloads"
}const api = new SpigetAPI("test");
const resources = await api.getResources({
sort: {
must: 'most',
field: 'downloads'
}
});