List all Slack rooms.

    :param api_key: The Slack admin api key.
    :return: The room list.

    CLI Example:

    .. code-block:: bash

        salt '*' slack.list_rooms

        salt '*' slack.list_rooms api_key=peWcBiMOS9HrZG15peWcBiMOS9HrZG15
772008
def list_rooms(api_key=None):
    '''
    
    '''
    if not api_key:
        api_key = _get_api_key()
    return salt.utils.slack.query(function='rooms',
                                  api_key=api_key,
                                  opts=__opts__)
1259999
def list(self, limit=None, marker=None, name=None, visibility=None,
            member_status=None, owner=None, tag=None, status=None,
            size_min=None, size_max=None, sort_key=None, sort_dir=None,
            return_raw=False):
        
        uri = "/%s" % self.uri_base
        qs = utils.dict_to_qs(dict(limit=limit, marker=marker, name=name,
                visibility=visibility, member_status=member_status,
                owner=owner, tag=tag, status=status, size_min=size_min,
                size_max=size_max, sort_key=sort_key, sort_dir=sort_dir))
        if qs:
            uri = "%s?%s" % (uri, qs)
        return self._list(uri, return_raw=return_raw)
797379
def get_key_section_header(self, key, spaces):
        
        header = super(GoogledocTools, self).get_key_section_header(key, spaces)
        header = spaces + header + ':' + '\n'
        return header
744567
def list_keys(kwargs=None, call=None):
    '''
    
    '''
    if call != 'function':
        log.error(
            'The list_keys function must be called with -f or --function.'
        )
        return False

    if not kwargs:
        kwargs = {}

    ret = {}
    rcode, data = query(command='my/keys', method='GET')
    for pair in data:
        ret[pair['name']] = pair['key']
    return {'keys': ret}
142021
def current_api_key():
    
    if app.config.get('IGNORE_AUTH'):
        return models.ApiKey(
            id='anonymous_superuser',
            secret='',
            superuser=True)

    ops = _get_api_key_ops()
    api_key = ops.get()
    logging.debug('Authenticated as API key=%r', api_key.id)

    return api_key
912985
def list_(prefix='', region=None, key=None, keyid=None, profile=None):
    '''
    
    '''
    conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)

    def extract_name(queue_url):
        # Note: this logic taken from boto, so should be safe
        return _urlparse(queue_url).path.split('/')[2]

    try:
        r = conn.list_queues(QueueNamePrefix=prefix)
        # The 'QueueUrls' attribute is missing if there are no queues
        urls = r.get('QueueUrls', [])
        return {'result': [extract_name(url) for url in urls]}
    except botocore.exceptions.ClientError as e:
        return {'error': __utils__['boto3.get_error'](e)}
200040
def get_room
      response = self.class.get(@api.get_room_config[:url],
        :query => {:auth_token => @token }.merge(@api.get_room_config[:query_params]),
        :headers => @api.headers
      )

      ErrorHandler.response_code_to_exception_for :room, room_id, response
      response.parsed_response
    end
474109
def list_rooms(self, message):
        """"""
        context = {"rooms": self.available_rooms.values(), }
        self.say(rendered_template("rooms.html", context), message=message, html=True)
913404
def list_keys(self):
        '''
        
        '''
        key_dirs = self._check_minions_directories()

        ret = {}

        for dir_ in key_dirs:
            if dir_ is None:
                continue
            ret[os.path.basename(dir_)] = []
            try:
                for fn_ in salt.utils.data.sorted_ignorecase(os.listdir(dir_)):
                    if not fn_.startswith('.'):
                        if os.path.isfile(os.path.join(dir_, fn_)):
                            ret[os.path.basename(dir_)].append(
                                salt.utils.stringutils.to_unicode(fn_)
                            )
            except (OSError, IOError):
                # key dir kind is not created yet, just skip
                continue
        return ret
60665
def list_tokens(opts):
    '''
    
    '''
    ret = []
    redis_client = _redis_client(opts)
    if not redis_client:
        return []
    serial = salt.payload.Serial(opts)
    try:
        return [k.decode('utf8') for k in redis_client.keys()]
    except Exception as err:
        log.warning('Failed to list keys: %s', err)
        return []
964563
def with_checklist(self):
        
        data = []
        if self.name == "ALL":
            data = self.data
        else:
            for name in self.data:
                if self.name in name:
                    data.append(name)
        if data:
            text = "Press 'spacebar' to choose SlackBuild for view"
            title = " SlackBuilds.org "
            backtitle = "{0} {1}".format(_meta_.__all__, _meta_.__version__)
            status = False
            pkg = DialogUtil(data, text, title, backtitle, status).checklist()
            if pkg and len(pkg) > 1:
                print("\nslpkg: Error: Choose only one package")
                raise SystemExit()
            if pkg is None:
                raise SystemExit()
            self.name = "".join(pkg)
            os.system("clear")
353727
def list(self, teamId=None, rType=None, maxResults=C.MAX_RESULT_DEFAULT, limit=C.ALL):
    
    queryParams = {'teamId': teamId,
            'type': rType,
            'max': maxResults}
    queryParams = self.clean_query_Dict(queryParams)
    ret = self.send_request(C.GET, self.end, data=queryParams, limit=limit)
    return [Room(self.token, roomData) for roomData in ret['items']]
1104460
def get_all(self, key: str) -> List[str]:
        
        return self._dict.get(key.lower(), [])
349540
def api_key(self, api_key):
        
        if api_key is None:
            raise ValueError("Invalid value for `api_key`, must not be `None`")
        if api_key is not None and len(api_key) > 1000:
            raise ValueError("Invalid value for `api_key`, length must be less than or equal to `1000`")

        self._api_key = api_key
99852
def api_orgas(request, key=None, hproPk=None):
    """"""

    if not check_api_key(request, key, hproPk):
        return HttpResponseForbidden

    list_orgas = []

    if settings.PIAPI_STANDALONE:
        list_orgas = [{'id': -1, 'name': 'EBU', 'codops': 'ZZEBU'},
                      {'id': -2, 'name': 'RTS', 'codops': 'CHRTS'},
                      {'id': -3, 'name': 'BBC', 'codops': 'GBEBU'},
                      {'id': -4, 'name': 'CNN', 'codops': 'USCNN'}]

    else:
        from organizations.models import Organization

        (_, _, hproject) = getPlugItObject(hproPk)

        if hproject and hproject.plugItLimitOrgaJoinable:
            orgas = hproject.plugItOrgaJoinable.order_by('name').all()
        else:
            orgas = Organization.objects.order_by('name').all()

        list_orgas = [{'id': orga.pk, 'name': orga.name, 'codops': orga.ebu_codops} for orga in orgas]

    retour = {'data': list_orgas}

    return HttpResponse(json.dumps(retour), content_type="application/json")
959385
def members(options = {})
      response = self.class.get(@api.member_config[:url],
        :query => { :auth_token => @token }.merge(options),
        :headers => @api.headers)

      ErrorHandler.response_code_to_exception_for :room, room_id, response
      wrap_users(response)
    end
553721
def list(self, limit=None, marker=None, name=None, visibility=None,
            member_status=None, owner=None, tag=None, status=None,
            size_min=None, size_max=None, sort_key=None, sort_dir=None):
        
        return self._manager.list(limit=limit, marker=marker, name=name,
                visibility=visibility, member_status=member_status,
                owner=owner, tag=tag, status=status, size_min=size_min,
                size_max=size_max, sort_key=sort_key, sort_dir=sort_dir)