Get information about all Koji channels.

        :param **kwargs: keyword args to pass through to listChannels RPC.
        :returns: deferred that when fired returns a list of Channel objects.
7638
def listChannels(self, **kwargs):
        
        data = yield self.call('listChannels', **kwargs)
        channels = []
        for cdata in data:
            channel = Channel.fromDict(cdata)
            channel.connection = self
            channels.append(channel)
        defer.returnValue(channels)
1373537
def get_channels_by_sln(self, channel_type, sln):
        
        return self.search_channels(type=channel_type, tag_sln=sln)
704545
def construct_channel(self, **kwargs):
        
        channel = self.get_channel(**kwargs)
        json_tree_path = self.get_json_tree_path(**kwargs)
        json_tree = read_tree_from_json(json_tree_path)
        build_tree_from_json(channel, json_tree['children'])
        raise_for_invalid_channel(channel)
        return channel
1300948
def history(self, channel_name, **kwargs):
        
        channel_id = self.get_channel_id(channel_name)
        self.params.update({'channel': channel_id})
        if kwargs:
            self.params.update(kwargs)
        return FromUrl('https://slack.com/api/channels.history', self._requests)(data=self.params).get()
532464
def channels(self):
        """"""
        return types.MappingProxyType({
            ch.name: ch for ch in self._refs.values()
            if not ch.is_pattern})
944301
def get_units(**kwargs):
    
    units_list = db.DBSession.query(Unit).all()
    units = []
    for unit in units_list:
        new_unit = JSONObject(unit)
        units.append(new_unit)

    return units
140881
def services(self, *args, **kwargs):
        
        return self._client.services(*args, scope=self.id, **kwargs)
556052
def text_channels(self):
        
        r = [ch for ch in self._channels.values() if isinstance(ch, TextChannel)]
        r.sort(key=lambda c: (c.position, c.id))
        return r
504546
def channel(self, channel_id=None):
        
        if channel_id in self.channels:
            return self.channels[channel_id]

        return Channel(self, channel_id)
120898
def hosts(self, **kwargs):
        
        kwargs['channelID'] = self.id
        return self.connection.listHosts(**kwargs)
576736
def get_projects(self, **kwargs):
        

        _login = kwargs.get('login', self._login)
        search_url = SEARCH_URL.format(login=_login)
        return self._request_api(url=search_url).json()
478682
def list_broadcasts():
    
    casts = [{'cast': b[0], 'onto': b[1]} for b in orca.list_broadcasts()]
    return jsonify(broadcasts=casts)
1329122
def get_messages(self, *args, **kwargs):
        
        return self.get_content(self.config['messages'], *args, **kwargs)
101818
def items(self, *args, **kwargs):
        
        return self.get_stream()(self.get_object(*args, **kwargs))
1226347
def get_channel(self, name):
        
        r = self.kraken_request('GET', 'channels/' + name)
        return models.Channel.wrap_get_channel(r)
657648
def get_broadcasts(self, type="", page=None,
            remote_content_id=None, limit=None, **kwargs):
        '''
        
        '''
        if remote_content_id:
            return self.get_broadcasts_by_remote(remote_content_id)

        params = {'type': type}
        if page:
            params['page'] = page

        params.update(kwargs)

        result = self._call('broadcasts', params=params,
            content_type='application/json')
        broadcasts = [Broadcast(b) for b in result]

        if limit:
            return broadcasts[:limit]
        return broadcasts
996846
def get_channels(self):
        """"""
        self.request(EP_GET_TV_CHANNELS)
        return {} if self.last_response is None else self.last_response.get('payload').get('channelList')