Git Product home page Git Product logo

bnapi's Introduction

bnapi

Blizzard Battle.net API wrapper for Deno -- bnapi.

Usage

Setup a client at https://develop.battle.net/access/, get API Key and API Secret. Use those like so:

// main.ts
import * as bnapi from 'https://deno.land/x/bnapi/mod.ts'

const ok = await bnapi.auth(
    'YOUR_API_KEY_HERE'
    'YOUR_API_SECRET_HERE'
    'eu', // region
    'en_GB' // locale
)

if (ok) {
    const races = await bnapi.wow.playableRaces()
    console.log('All playable races', races)

    const race = await bnapi.wow.playableRace(races[0].id)
    console.log('Details on the very first race', race)
} else {
    console.error('Failed to auth')
}

Run your code like so:

deno run --allow-net main.ts

World of Warcraft

All the API for World of Warcraft is located in wow object. Every call returns result object (or array of objects) on success and false in case of failure. Some fails are not considered an API failure, for example, if you try to get list of hunter pets for a character that is not a hunter, you get false (not an empty array). These rare cases described in the Blizzard API (see links below).

  • Game Data APIs link

    • Achievement API
    • Auction House API
    • Azerite Essence API
    • Connected Realm API
    • Covenant API
    • Creature API
    • Guild Crest API
    • Item API
    • Journal API
    • Media Search API
    • Modified Crafting API
    • Mount API
    • Mythic Keystone Affix API
    • Mythic Keystone Dungeon API
    • Mythic Keystone Leaderboard API
    • Mythic Raid Leaderboard API
    • Pet API
    • Playable Class API
    • Playable Race API
    • Playable Specialization API
    • Power Type API
    • Profession API
    • PvP Season API
    • PvP Tier API
    • Quest API
    • Realm API
    • Region API
    • Reputations API
    • Spell API
    • Talent API
    • Tech Talent API
    • Title API
    • WoW Token API
  • Profile APIs link

    • Account Profile API
    • Character Achievements API
    • Character Appearance API
    • Character Collections API
    • Character Encounters API
    • Character Equipment API
    • Character Hunter Pets API
    • Character Media API
    • Character Mythic Keystone Profile API
    • Character Professions API
    • Character Profile API
    • Character PvP API
    • Character Quests API
    • Character Reputations API
    • Character Soulbinds API
    • Character Specializations API
    • Character Statistics API
    • Character Titles API
    • Guild API

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.