Rantanen / node-mumble

Mumble client in Node.js
MIT License
155 stars 48 forks source link

Add high level API #8

Closed Prior99 closed 9 years ago

Prior99 commented 9 years ago

This pull request introduces a new highlevel api in addition to the previously available low level api. All relevant events and methods are forwarded so nothing is broken with this pull request.

There are 3 new classes:

User and Channel classes represent users and channels with methods to access attributes in an object-oriented approach.

MumbleWrapper wraps around the MumbleConnection and initializes the User and Channel classes accordingly.

Take a look at the examples/wrapper.js

Documentation will follow.

Rantanen commented 9 years ago

Oh wow! I had been planning something similar but you definitely beat me to it! Nice work! Thanks!

Just one small thing - but if you're working on documentation you can do that at the same time: Please add yourself to the LICENSE file in the project root. :)

Prior99 commented 9 years ago

Thank you :-) Could you have a look at creating outputStreams for single users? First you forgot to pass the parameter sessionId to the outputStreams constructor but even if you do it doesn't really work.

Prior99 commented 9 years ago

Where do you watn the API? In an api.md? In the readme.md or in the wiki?

Rantanen commented 9 years ago

Good question! I think the Wiki would be good for it. The API seems broad enough that writing it in whole to README.md might be a bit too much.

You can also clone the wikis with git so working with them offline is easy enough.

I'll take a look at the output streams.

Prior99 commented 9 years ago

I am also done with the API now. You can find it in the wiki.