@blizzard-api/wow
Version:
A series of helpers to interact with the World of Warcraft Blizzard API
155 lines (154 loc) • 3.92 kB
JavaScript
import { wowBasePath, wowSearchBasePath } from "@blizzard-api/core";
//#region src/housing-decor/index.ts
/**
*
* Returns an index of decor.
* @returns An index of decor. See {@link DecorIndexResponse}.
*/
function decorIndex() {
return {
namespace: "static",
path: "/data/wow/decor/index"
};
}
/**
* Returns a decor by ID.
* @param decorId The decor ID.
* @returns A decor. See {@link DecorResponse}.
*/
function decor(decorId) {
return {
namespace: "static",
path: `${wowBasePath}/decor/${decorId}`
};
}
/**
* Searches for decor.
* @param options The search parameters. See {@link GenericDecorSearchParameters}.
* @returns A decor. See {@link DecorSearchResponse}.
*/
function decorSearch(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}/decor`
};
}
/**
* Returns an index of fixtures.
* @returns An index of fixtures. See {@link FixtureIndexResponse}.
*/
function fixtureIndex() {
return {
namespace: "static",
path: `${wowBasePath}/fixture/index`
};
}
/**
* Returns a fixture by ID.
* @param fixtureId The fixture ID.
* @returns A fixture. See {@link FixtureResponse}.
*/
function fixture(fixtureId) {
return {
namespace: "static",
path: `${wowBasePath}/fixture/${fixtureId}`
};
}
/**
* Searches for fixtures.
* @param options The search parameters. See {@link GenericDecorSearchParameters}.
* @returns A fixture. See {@link FixtureSearchResponse}.
*/
function fixtureSearch(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}/fixture`
};
}
/**
* Returns an index of fixture hooks.
* @returns An index of fixture hooks. See {@link FixtureHookIndexResponse}.
*/
function fixtureHookIndex() {
return {
namespace: "static",
path: `${wowBasePath}/fixture-hook/index`
};
}
/**
* Returns a fixture hook by ID.
* @param fixtureHookId The fixture hook ID.
* @returns A fixture hook. See {@link FixtureHookResponse}.
*/
function fixtureHook(fixtureHookId) {
return {
namespace: "static",
path: `${wowBasePath}/fixture-hook/${fixtureHookId}`
};
}
/**
* Searches for fixture hooks.
* @param options The search parameters. See {@link GenericDecorSearchParameters}.
* @returns A fixture hook. See {@link FixtureSearchResponse}.
*/
function fixtureHookSearch(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}/fixture-hook`
};
}
/**
* Returns an index of rooms.
* @returns An index of rooms. See {@link RoomIndexReponse}.
*/
function roomIndex() {
return {
namespace: "static",
path: `${wowBasePath}/room/index`
};
}
/**
* Returns a room by ID.
* @param roomId The room ID.
* @returns A room. See {@link RoomResponse}.
*/
function room(roomId) {
return {
namespace: "static",
path: `${wowBasePath}/room/${roomId}`
};
}
/**
* Searches for rooms.
* @param options The search parameters. See {@link GenericDecorSearchParameters}.
* @returns A room. See {@link RoomSearchResponse}.
*/
function roomSearch(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}/room`
};
}
//#endregion
export { decor, decorIndex, decorSearch, fixture, fixtureHook, fixtureHookIndex, fixtureHookSearch, fixtureIndex, fixtureSearch, room, roomIndex, roomSearch };
//# sourceMappingURL=index.js.map