@blizzard-api/wow
Version:
A series of helpers to interact with the World of Warcraft Blizzard API
43 lines (42 loc) • 1.05 kB
JavaScript
import { wowBasePath, wowSearchBasePath } from "@blizzard-api/core";
//#region src/mount/index.ts
/**
* Get a mount by ID.
* @param mountId The mount ID.
* @returns The mount. See {@link MountResponse}.
*/
function mount(mountId) {
return {
namespace: "static",
path: `${wowBasePath}/mount/${mountId}`
};
}
/**
* Get a mount index.
* @returns The mount index. See {@link MountIndexResponse}.
*/
function mountIndex() {
return {
namespace: "static",
path: `${wowBasePath}/mount/index`
};
}
/**
* Get a mount search.
* @param options The search parameters. See {@link MountSearchParameters}.
* @returns The search results. See {@link MountSearchResponse}.
*/
function mountSearch(options) {
return {
namespace: "static",
parameters: {
_page: options._page,
[`name.${options.locale}`]: options.name,
orderby: Array.isArray(options.orderby) ? options.orderby.join(",") : options.orderby
},
path: `${wowSearchBasePath}/mount`
};
}
//#endregion
export { mount, mountIndex, mountSearch };
//# sourceMappingURL=index.js.map