Skip to content

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:

Parameters

must: Can be most or least.

field: Its the name of the property that will be evaluated. (Example: downloads)

Object Example

{
    "must": "most",
    "field": "downloads"
}

Real use Example

const api = new SpigetAPI("test");

const resources = await api.getResources({
    sort: {
        must: 'most',
        field: 'downloads'
    }
});

Clone this wiki locally