@blizzard-api/wow
Version:
A series of helpers to interact with the World of Warcraft Blizzard API
104 lines (103 loc) • 5.08 kB
JavaScript
//#region src/account-profile/index.ts
const accountProfileBase = "/profile/user/wow";
/**
* Because this endpoint provides data about the current logged-in user's World of Warcraft account, it requires an access token with the wow.profile scope acquired via the Authorization Code Flow. See {@link https://develop.battle.net/documentation/guides/using-oauth/authorization-code-flow}
* @param token The OAuth 2.0 access token to use for authentication.
* @returns an index of collection types for an account.
*/
function accountCollectionsIndex(token) {
return {
namespace: "profile",
path: `${accountProfileBase}/collections`,
token
};
}
/**
* Because this endpoint provides data about the current logged-in user's World of Warcraft account, it requires an access token with the wow.profile scope acquired via the Authorization Code Flow. See {@link https://develop.battle.net/documentation/guides/using-oauth/authorization-code-flow}
* @param token The OAuth 2.0 access token to use for authentication.
* @returns a summary of the heirlooms an account has obtained.
*/
function accountHeirloomsCollectionSummary(token) {
return {
namespace: "profile",
path: `${accountProfileBase}/collections/heirlooms`,
token
};
}
/**
* Because this endpoint provides data about the current logged-in user's World of Warcraft account, it requires an access token with the wow.profile scope acquired via the Authorization Code Flow. See {@link https://develop.battle.net/documentation/guides/using-oauth/authorization-code-flow}
* @param token The OAuth 2.0 access token to use for authentication.
* @returns a summary of the mounts an account has obtained.
*/
function accountMountsCollectionSummary(token) {
return {
namespace: "profile",
path: `${accountProfileBase}/collections/mounts`,
token
};
}
/**
* Because this endpoint provides data about the current logged-in user's World of Warcraft account, it requires an access token with the wow.profile scope acquired via the Authorization Code Flow. See {@link https://develop.battle.net/documentation/guides/using-oauth/authorization-code-flow}
* @param token The OAuth 2.0 access token to use for authentication.
* @returns a summary of the battle pets an account has obtained.
*/
function accountPetsCollectionSummary(token) {
return {
namespace: "profile",
path: `${accountProfileBase}/collections/pets`,
token
};
}
/**
* Because this endpoint provides data about the current logged-in user's World of Warcraft account, it requires an access token with the wow.profile scope acquired via the Authorization Code Flow. See {@link https://develop.battle.net/documentation/guides/using-oauth/authorization-code-flow}
* @param token The OAuth 2.0 access token to use for authentication.
* @returns a profile summary for an account.
*/
function accountProfileSummary(token) {
return {
namespace: "profile",
path: accountProfileBase,
token
};
}
/**
* Because this endpoint provides data about the current logged-in user's World of Warcraft account, it requires an access token with the wow.profile scope acquired via the Authorization Code Flow. See {@link https://develop.battle.net/documentation/guides/using-oauth/authorization-code-flow}
* @param token The OAuth 2.0 access token to use for authentication.
* @returns a summary of the toys an account has obtained.
*/
function accountToysCollectionSummary(token) {
return {
namespace: "profile",
path: `${accountProfileBase}/collections/toys`,
token
};
}
/**
* Because this endpoint provides data about the current logged-in user's World of Warcraft account, it requires an access token with the wow.profile scope acquired via the Authorization Code Flow. See {@link https://develop.battle.net/documentation/guides/using-oauth/authorization-code-flow}
* @param token The OAuth 2.0 access token to use for authentication.
* @returns a summary of the transmog unlocks an account has obtained.
*/
function accountTransmogsCollectionSummary(token) {
return {
namespace: "profile",
path: `${accountProfileBase}/collections/transmogs`,
token
};
}
/**
* Because this endpoint provides data about the current logged-in user's World of Warcraft account, it requires an access token with the wow.profile scope acquired via the Authorization Code Flow. See {@link https://develop.battle.net/documentation/guides/using-oauth/authorization-code-flow}
* @param realmId The realm ID.
* @param characterId The character ID.
* @param token The OAuth 2.0 access token to use for authentication.
* @returns a protected profile summary for a character.
*/
function protectedCharacterProfileSummary(realmId, characterId, token) {
return {
namespace: "profile",
path: `${accountProfileBase}/protected-character/${realmId}-${characterId}`,
token
};
}
//#endregion
export { accountCollectionsIndex, accountHeirloomsCollectionSummary, accountMountsCollectionSummary, accountPetsCollectionSummary, accountProfileSummary, accountToysCollectionSummary, accountTransmogsCollectionSummary, protectedCharacterProfileSummary };
//# sourceMappingURL=index.js.map