Data - xivapi/xivapi-js GitHub Wiki
xiv.data
.content()
Get an array of all content names.
Returns: [ string ]
.list(name, params)
Get a paginated list of content for the specified content name.
Params object:
Parameter | Type | Description |
---|---|---|
limit | number | Limit the number of results. |
ids | CSV* | Filter results down to specific ids. |
page | string | The page to navigate to. See [Pagination](/xivapi/xivapi-js/wiki/Home#pagination). |
*CSV: accepts either string (e.g.
'35,67,201'
) or array (e.g.[35, 67, 201]
)
Returns: { Pagination, Results }
.get(name, id)
Get a specific object from the given content name with the specified ID.
Returns: Object
.servers()
https://xivapi.com/docs/Game-Data#servers List all servers.
> xiv.data.servers()
[ 'Adamantoise',
'Aegis',
'Alexander',
'Anima',
'Asura',
...
]
.datacenters()
https://xivapi.com/docs/Game-Data#data-center List servers grouped by datacenter.
> xiv.data.datacenters()
{
Aether: [Array],
Chaos: [Array],
Elemental: [Array],
Gaia: [Array],
Mana: [Array],
Primal: [Array]
}