How to set publicKey/privateKey #5

Closed
kimptoc opened this Issue Jan 10, 2013 · 2 comments

Projects

None yet

2 participants

@kimptoc

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

@xtian xtian added a commit that closed this issue Mar 11, 2013
@xtian Fixed auth references. Fixes #5. f1e9a6f
@xtian xtian closed this in f1e9a6f Mar 11, 2013
@xtian
Owner

Whoops, that was a dumb mistake. :)

Sorry about that!

@kimptoc

No problem - keeps me on my JS toes :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment