forked from platypush/platypush
66d78c8615
- Using `@action` annotation to indicate methods that are allowed to be executed as actions - The output and errors of an action are automatically wrapped into a `Response` object without any response build required on the plugin side
51 lines
910 B
Python
51 lines
910 B
Python
from platypush.plugins import Plugin, action
|
|
|
|
|
|
class MusicPlugin(Plugin):
|
|
def __init__(self, *args, **kwargs):
|
|
super().__init__(*args, **kwargs)
|
|
|
|
@action
|
|
def play(self):
|
|
raise NotImplementedError()
|
|
|
|
@action
|
|
def pause(self):
|
|
raise NotImplementedError()
|
|
|
|
@action
|
|
def stop(self):
|
|
raise NotImplementedError()
|
|
|
|
@action
|
|
def next(self):
|
|
raise NotImplementedError()
|
|
|
|
@action
|
|
def previous(self):
|
|
raise NotImplementedError()
|
|
|
|
@action
|
|
def setvol(self, vol):
|
|
raise NotImplementedError()
|
|
|
|
@action
|
|
def add(self, content):
|
|
raise NotImplementedError()
|
|
|
|
@action
|
|
def playlistadd(self, playlist):
|
|
raise NotImplementedError()
|
|
|
|
@action
|
|
def clear(self):
|
|
raise NotImplementedError()
|
|
|
|
@action
|
|
def status(self):
|
|
raise NotImplementedError()
|
|
|
|
|
|
# vim:sw=4:ts=4:et:
|
|
|