@blizzard-api/classic-wow
Version:
A series of helpers to interact with the World of Warcraft Classic Blizzard API
105 lines (104 loc) • 3.38 kB
JavaScript
import { wowBasePath } from "@blizzard-api/core";
//#region src/pvp-season/index.ts
/**
* Get a PvP leaderboard by PvP season ID and bracket.
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
* @param pvpRegionId The PvP region ID.
* @param pvpSeasonId The PvP season ID.
* @param pvpBracket The PvP bracket.
* @returns The PvP leaderboard.
*/
function pvpLeaderboard(namespace, pvpRegionId, pvpSeasonId, pvpBracket) {
return {
namespace,
path: `${wowBasePath}/pvp-region/${pvpRegionId}/pvp-season/${pvpSeasonId}/pvp-leaderboard/${pvpBracket}`
};
}
/**
* Returns an index of PvP leaderboards for a PvP season in a given PvP region.
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
* @param pvpRegionId The PvP region ID.
* @param pvpSeasonId The PvP season ID.
* @returns The PvP leaderboard index.
*/
function pvpLeaderboardIndex(namespace, pvpRegionId, pvpSeasonId) {
return {
namespace,
path: `${wowBasePath}/pvp-region/${pvpRegionId}/pvp-season/${pvpSeasonId}/pvp-leaderboard/index`
};
}
/**
* Returns a PvP season by region ID and season ID.
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
* @param pvpRegionId The PvP region ID.
* @param pvpSeasonId The PvP season ID.
* @returns The PvP season.
*/
function pvpRegionalSeason(namespace, pvpRegionId, pvpSeasonId) {
return {
namespace,
path: `${wowBasePath}/pvp-region/${pvpRegionId}/pvp-season/${pvpSeasonId}`
};
}
/**
* Returns an index of PvP Seasons in a PvP region.
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
* @param pvpRegionId The PvP region ID.
* @returns The PvP season index. See {@link PvpSeasonIndexResponse}.
*/
function pvpRegionalSeasonIndex(namespace, pvpRegionId) {
return {
namespace,
path: `${wowBasePath}/pvp-region/${pvpRegionId}/pvp-season/index`
};
}
/**
* Returns an index of PvP Regions.
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
* @returns The PvP region index.
*/
function pvpRegionIndex(namespace) {
return {
namespace,
path: `${wowBasePath}/pvp-region/index`
};
}
/**
* Returns an index of PvP rewards for a PvP season in a given PvP region.
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
* @param pvpRegionId The PvP region ID.
* @param pvpSeasonId The PvP season ID.
* @returns The PvP reward index.
*/
function pvpRewardsIndex(namespace, pvpRegionId, pvpSeasonId) {
return {
namespace,
path: `${wowBasePath}/pvp-region/${pvpRegionId}/pvp-season/${pvpSeasonId}/pvp-reward/index`
};
}
/**
* Get a PvP season by ID.
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
* @param pvpSeasonId The PvP season ID.
* @returns The PvP season. See {@link PvpSeasonResponse}.
*/
function pvpSeason(namespace, pvpSeasonId) {
return {
namespace,
path: `${wowBasePath}/pvp-season/${pvpSeasonId}`
};
}
/**
* Get a PvP season index.
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
* @returns The PvP season index. See {@link PvpSeasonIndexResponse}.
*/
function pvpSeasonIndex(namespace) {
return {
namespace,
path: `${wowBasePath}/pvp-season/index`
};
}
//#endregion
export { pvpLeaderboard, pvpLeaderboardIndex, pvpRegionIndex, pvpRegionalSeason, pvpRegionalSeasonIndex, pvpRewardsIndex, pvpSeason, pvpSeasonIndex };
//# sourceMappingURL=index.js.map