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

netbeast.get returns a response, not a device state #20

Open
timonreinhard opened this issue Aug 29, 2016 · 3 comments
Open

netbeast.get returns a response, not a device state #20

timonreinhard opened this issue Aug 29, 2016 · 3 comments

Comments

@timonreinhard
Copy link

timonreinhard commented Aug 29, 2016

The README.md gives an example on how to gather data about devices, which looks awesomely simple and straight forward:

beast('temperature').at('kitchen').get().then(function (data) {
    console.log('The temperature in the kitchen is ' + data + 'ºC')
})

The Promise is however fulfilled with a Response rather than the actual data. Same goes for calling get('temperature') as the argument is unused in the code. So for some reason the docs are quite different from the actual implemenation.

┆Issue is synchronized with this Asana task

@jsdario
Copy link
Member

jsdario commented Aug 29, 2016

Hi @timonreinhard! Yes you are right, there has been some hard refactoring during the latest weeks of development and the devices should be returning data directly, rather than the response. You can easily work around that, though.

About the args, you are right. It seems that you are always going to receive all params from the device, since the query remains unsent. It is also due to our refactor towards a diferent API structure. If you review past versions of the code, it may make more sense.

Since the project is now bigger I beg you a little bit of patience for updates. Also if you are so kind you can create a PR yourself. That'll be more than welcome :)

@timonreinhard
Copy link
Author

Great to hear about those things to come as I actually really like the ideas behind Netbeast. I'll dig deeper now and look forward in contributing.

@jsdario
Copy link
Member

jsdario commented Aug 29, 2016

Thanks. It is always nice to hear. If you have a project to share consider joining also the forum :)

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

No branches or pull requests

2 participants