asterisk / ari-py

Library for accessing the Asterisk REST Interface
Other
151 stars 106 forks source link

Allow for variable arguments to be passed to callbacks #7

Closed samuelg closed 10 years ago

samuelg commented 10 years ago

Alternate implementation of #5 so we can write:

current_playback.on_event('PlaybackFinished', my_callback, foo, bar, baz=True)

instead of:

current_playback.on_event('PlaybackFinished', my_callback, callback_args=[foo, bar], callback_keywords = {'baz': True})

Also added a unit test for passing arbitrary parameters to a callback handler.

matt-jordan commented 10 years ago

Looks good to me.