platypush/plugins/sound/core.py
def build(cls, *args, **kwargs):
        """
        Construct a sound object either from a JSON representation or a
        key-value representation
        """

        if args:
            if isinstance(args[0], cls):
                return args[0]
            if isinstance(args[0], str):
                kwargs = json.loads(args[0])
            elif isinstance(args[0], dict):
                kwargs = args[0]
        if kwargs:
            return Sound(**kwargs)

        raise RuntimeError('Usage: {}'.format(__doc__))

        Construct a sound object either from a JSON representation or a
        key-value representation
        
Construct a sound object either from a JSON representation or a
key-value representation
Construct a sound object either from a JSON representation or a key - value representation
def build(cls, *args, **kwargs):
        if args:
            if isinstance(args[0], cls):
                return args[0]
            if isinstance(args[0], str):
                kwargs = json.loads(args[0])
            elif isinstance(args[0], dict):
                kwargs = args[0]
        if kwargs:
            return Sound(**kwargs)
        raise RuntimeError('Usage: {}'.format(__doc__))
def build ( cls , * args , ** kwargs ) : if args : if isinstance ( args [ 0 ] , cls ) : return args [ 0 ] if isinstance ( args [ 0 ] , str ) : kwargs = json . loads ( args [ 0 ] ) elif isinstance ( args [ 0 ] , dict ) : kwargs = args [ 0 ] if kwargs : return Sound ( ** kwargs ) raise RuntimeError ( 'Usage: {}' . format ( __doc__ ) )
Construct a sound object either from a JSON representation or a
key-value representation
Construct a sound object either from a JSON representation or a key - value representation
"""
        Construct a sound object either from a JSON representation or a
        key-value representation
        """
cls