Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set publicKey/privateKey #5

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

How to set publicKey/privateKey #5

kimptoc opened this issue Jan 10, 2013 · 2 comments

Comments

@kimptoc
Copy link

kimptoc commented Jan 10, 2013

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 closed this as completed in f1e9a6f Mar 11, 2013
@xtian
Copy link
Owner

xtian commented Mar 11, 2013

Whoops, that was a dumb mistake. :)

Sorry about that!

@kimptoc
Copy link
Author

kimptoc commented Mar 11, 2013

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants