TheThingsArchive / node-app-sdk

The Things Network Application SDK for Node.JS
https://www.thethingsnetwork.org/docs/node-js/
MIT License
41 stars 28 forks source link

get EUIs for an application #73

Closed noerw closed 6 years ago

noerw commented 7 years ago

When adding new devices an app EUI is required. This value currently cannot be retrieved with this SDK. I would enhance either application.get() with an additional call to the account server, or add a new function application.euis().

request({
  url: `https://account.thethingsnetwork.org/applications/${appId}/euis`,
  headers: { 'Authorization': `Key ${key}` },
  json: true
}

I can send a PR if the feature is desired. I guess the account server domain should be configurable?

johanstokking commented 7 years ago

@noerw good suggestion!

I would add it indeed as separate call, to keep calls to the Handler separate from the Account Server.

And indeed, it should be configurable, but I'm quite sure it is already?

romeovs commented 6 years ago

I guess the account server domain should be configurable?

It most definitely is!

romeovs commented 6 years ago

Closing because it is already implemented.