Giter VIP home page Giter VIP logo

node-armory's People

Contributors

xtian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

node-armory's Issues

Need to pass 'Date' header when using auth

Like this:

var header_date = new Date().toUTCString();
headers['Date'] = header_date;

And

    signature.update(
        'GET\n' +
        header_date + '\n' +
        encodeURI(path) + '\n'
    );

~chris

How to set publicKey/privateKey

Hi,

I am trying to set the public/private keys like so:

a=require('armory')

a.publicKey=process.env.WOW_API_PUBLIC_KEY

a.privateKey=process.env.WOW_API_PRIVATE_KEY

a.classes({region:"eu"},function(){})

a has the properties set, but its not seeing them internally to use in the actual api call. I guess I am doing it wrong.

It looks to me as if the wrap/initParam's functions are ensuring the calls use the original armory object and not the one I have set the properties on, and I cant see a way to set the properties on the underlying original armory object.

So, I thought this might work:

a = require('armory')

a.publicKey=process.env.WOW_API_PUBLIC_KEY

a.privateKey=process.env.WOW_API_PRIVATE_KEY

b = a.defaults({})

b.classes({region:"eu"},function(){})

But still no joy - how do I do it?

Thanks,
Chris

Achievements fail

Attempting to poll achievement, characterAchievements, or guildAchievements all fail:

[Error: When in doubt, blow it up. (page not found)]
{"status":"nok","reason":"When in doubt, blow it up. (page not found)"}

When doing a basic characterAchievements call, getting 404 from armory due to /? on end of url

I have patched my version to only add the /? when there are query options.

Need to re-run the tests, but I guess they worked as there was always parameters present.

Although, just noticed the Battlegroups call requires it, at least the spec says so...

Battlegroups
The battlegroups data API provides the list of battlegroups for this region. Please note the trailing / on this request url.
URL = Host + "/api/wow/data/battlegroups/"

Support for the 'new' context feature on the items request?

Hi,

Blizzard have added context for items - see discussion around it here: http://us.battle.net/en/forum/topic/14882018658

For example:

This call:
http://us.battle.net/api/wow/item/112826

returns:

{"id":112826,"availableContexts":["raid-finder","raid-normal","raid-heroic","raid-mythic"]}

Which you can then 'refine' into this call:

http://us.battle.net/api/wow/item/112826/raid-mythic

Which gives you the context specific item.

Thanks in advance,
Chris

When using auth, the path part needs encodeURI

Like this:

    signature.update(
        'GET\n' +
        header_date + '\n' +
        encodeURI(path) + '\n'
    );

Otherwise you get invalid signature errors for any realms/names with exotic chars - even a space.

Regards,
Chris

Using a proxy, eg like Charles

Hi,

I am getting some occasional internal server errors when I call the armory.

Is there a way to use a proxy like Charles to see the full response details?

Or is there a better way to view this, eg verbose on :)

I see that the request library used, https://github.com/mikeal/request, supports proxies.

I am thinking to give node-armory a way of passing through http options, perhaps as an extra option.

Thanks,
Chris

PS A sample way of doing this is in this fork:
https://github.com/kimptoc/node-armory

No tests added :( - could do something like use sinon to mock a proxy server and test via that...

Options._Query Character Parameter For Query Fields

Hey there.

I am new to Node, so I am sure that I am missing a step here and maybe you can help.

What I am trying to do is:

app.post('/api/character', function(req, res) {
    var armory = require('armory').defaults({
        name: req.body.characterName,
        realm: req.body.serverName,
        region: req.body.serverCountry,
        _query: 'stats,professions,titles,items,reputation,mounts,pets,achievements'
    })

    armory.character(function(err, character){
            console.log(character);
    })

    res.status(200).send('angular send off');
});

So, the '_query' should have all of the fields that I am trying to request from the Blizzard API for that specific character, but it is just empty when I console.log it in 'armory/index.js' file that you created.

What I am missing here to get your wrapper class to send off the fields to API to get back all of that data?

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.