connectordb/_user.py
def streams(self, public=False, downlink=False, visible=True):
        """Returns the list of streams that belong to the user.
        The list can optionally be filtered in 3 ways:
            - public: when True, returns only streams belonging to public devices
            - downlink: If True, returns only downlink streams
            - visible: If True (default), returns only streams of visible devices
        """
        result = self.db.read(self.path, {"q": "streams",
                                          "public": str(public).lower(),
                                          "downlink": str(downlink).lower(),
                                          "visible": str(visible).lower()})

        if result is None or result.json() is None:
            return []
        streams = []
        for d in result.json():
            s = self[d["device"]][d["name"]]
            s.metadata = d
            streams.append(s)
        return streams
def streams(self, public=False, downlink=False, visible=True):
        """Returns the list of streams that belong to the user.
        The list can optionally be filtered in 3 ways:
            - public: when True, returns only streams belonging to public devices
            - downlink: If True, returns only downlink streams
            - visible: If True (default), returns only streams of visible devices
        """
        result = self.db.read(self.path, {"q": "streams",
                                          "public": str(public).lower(),
                                          "downlink": str(downlink).lower(),
                                          "visible": str(visible).lower()})

        if result is None or result.json() is None:
            return []
        streams = []
        for d in result.json():
            s = self[d["device"]][d["name"]]
            s.metadata = d
            streams.append(s)
        return streams
Returns the list of streams that belong to the user.
        The list can optionally be filtered in 3 ways:
            - public: when True, returns only streams belonging to public devices
            - downlink: If True, returns only downlink streams
            - visible: If True (default), returns only streams of visible devices