Giter Site home page Giter Site logo

Comments (6)

 avatar commented on May 31, 2024

So I got clarification from Blizzard that the old style host will be going away, so there is no point in allowing the host to be overridden. I still do have a problem that the new style host is not working for me. I think it must be something to do with the environment I am in (node webkit rather than node). I will try and investigate some more.

Edit: Apparently I fail at copy and pasting apikeys. Your library works great, looking forward to the ability to set the apikey on the fly.

from battlenet-api.

Schamper avatar Schamper commented on May 31, 2024

I too would like the ability to set the API key on the fly. Do you still work on this?

from battlenet-api.

benweier avatar benweier commented on May 31, 2024

Hi @Schamper I am still maintaining the repo and have started work on this issue. I've just been a bit slack since I've been involved in a work project. Sorry!

I'll get something out this weekend since I also need to check if there's anything to do to support the new Australian servers (yay!) and the features that have recently been released to the API.

from battlenet-api.

Schamper avatar Schamper commented on May 31, 2024

@benweier great to hear!

from battlenet-api.

benweier avatar benweier commented on May 31, 2024

Just an FYI on the delay - I found that simply adding an apikey option to the request object - while a serviceable solution - isn't going to cut it. I'm currently refactoring the parameters that get passed to the request module so that the requested data (character name/realm, achievement ID, etc) is separate from the request config (API key, custom timeout/gzip settings, or JSONP response).

This should provide a better solution overall for everyone using the module, but unfortunately will need a little more time to get right.

from battlenet-api.

benweier avatar benweier commented on May 31, 2024

Good news, I've finalised the solution (technically it's two solutions) and will be releasing an update in the next couple days. The changes will be API-compatible with any existing usage aside from one minor detail in the require statement.

var bnet = require('battlenet-api')

will become

var bnet = require('battlenet-api')()

You may optionally pass your API key with the require like so

var bnet = require('battlenet-api')(BATTLENET_API_KEY)

or you may pass the API key to the request method like so

bnet.wow.character.profile({origin: a, realm: b, name: c}, {apikey: x}, callback)

Watch this space for the commit.

from battlenet-api.

Related Issues (13)

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.