:param user_ids:  list of int of the user_ids to return
        :param usernames: list of str of the usernames to return
        :param status:    str of the status
        :return:          list of User
352685
def get(self, user_ids=None, usernames=None, status=None):
        
        return self.connection.get('user/array',
                                   user_ids=user_ids,
                                   usernames=usernames,
                                   status=status)
1194517
def lookup_handles(ids):
    
    names = set()
    for id_list in [ids[100 * i:100 * i + 100] for i in range(len(ids))]:
        if len(id_list) > 0:
            while True:
                r = twapi.request('users/lookup', {'user_id': ','.join([str(i) for i in id_list])})
                if r.status_code in [88, 130, 420, 429]:  # rate limit
                    sys.stderr.write('Sleeping off rate limit for %s: %s\n' % (str(id_list), r.text))
                    time.sleep(301)
                elif r.status_code == 200:
                    for item in r.get_iterator():
                        names.add((item['screen_name'], item['id_str']))
                    break
                else:
                    sys.stderr.write('Error: %s\nSkipping %s...\n' % (str(id_list), r.text))
                    break

    return names
787752
def users(self):
        
        if self._users is None:
            self._users = UserList(self._version, service_sid=self._solution['sid'], )
        return self._users
412822
def get_status(self, statusid):

        

        response = self._req('/user/statuses/{}'.format(statusid))

        s = Status()
        s.from_dict(response)

        return s
471849
def starred(self, **args):
		'''
		
		'''
		ids =[]
		r = requests.get(
			'%s/gists/starred'%BASE_URL,
			headers=self.gist.header
			)

		if 'limit' in args:
			limit = args['limit']
		else:
			limit = len(r.json())

		if (r.status_code == 200):
			for g in range(0,limit ):
				ids.append('%s/%s/%s' %(GIST_URL,r.json()[g]['user']['login'],r.json()[g]['id']))
			return ids

		raise Exception('Username not found')
1290218
def get_statuses(self, batch_ids):
        
        with self._lock:
            return {b: self.get_status(b) for b in batch_ids}
367407
def _wrap_users(users, request):
    
    result = set()
    for u in users:
        if u is SELF and is_authenticated(request):
            result.add(request.user.get_username())
        else:
            result.add(u)
    return result
933470
def user_list(profile=None, **connection_args):
    '''
    
    '''
    kstone = auth(profile, **connection_args)
    ret = {}
    for user in kstone.users.list():
        ret[user.name] = dict((value, getattr(user, value, None)) for value in dir(user)
                              if not value.startswith('_') and
                              isinstance(getattr(user, value, None), (six.string_types, dict, bool)))
        tenant_id = getattr(user, 'tenantId', None)
        if tenant_id:
            ret[user.name]['tenant_id'] = tenant_id
    return ret
1020368
def status(self, id):
        
        id = self.__unpack_id(id)
        url = '/api/v1/statuses/{0}'.format(str(id))
        return self.__api_request('GET', url)
1305566
def user_topic_ids(user):
    """"""

    if user.is_super_admin() or user.is_read_only_user():
        query = sql.select([models.TOPICS])
    else:
        query = (sql.select([models.JOINS_TOPICS_TEAMS.c.topic_id])
                 .select_from(
                     models.JOINS_TOPICS_TEAMS.join(
                         models.TOPICS, sql.and_(models.JOINS_TOPICS_TEAMS.c.topic_id == models.TOPICS.c.id,  # noqa
                                                 models.TOPICS.c.state == 'active'))  # noqa
                  ).where(
                      sql.or_(models.JOINS_TOPICS_TEAMS.c.team_id.in_(user.teams_ids),  # noqa
                              models.JOINS_TOPICS_TEAMS.c.team_id.in_(user.child_teams_ids))))  # noqa

    rows = flask.g.db_conn.execute(query).fetchall()
    return [str(row[0]) for row in rows]
715157
def get_mentions(status_dict, exclude=[]):
    
    # Canonicalise the exclusion dictionary by lowercasing all names and
    # removing leading @'s
    for i, user in enumerate(exclude):
        user = user.casefold()
        if user[0] == "@":
            user = user[1:]

        exclude[i] = user

    users = [user["username"] for user in status_dict["mentions"]
             if user["username"].casefold() not in exclude]
    return users
388956
def get_username(uid,**kwargs):
    
    rs = db.DBSession.query(User.username).filter(User.id==uid).one()

    if rs is None:
        raise ResourceNotFoundError("User with ID %s not found"%uid)

    return rs.username
1173592
def post(self, user_ids=None, usernames=None, status=None):
        
        return self.connection.post('user/array',
                                    data=dict(user_ids=user_ids,
                                              usernames=usernames,
                                              status=status))
290172
def _get_id_from_username(self, username):
        
        _mask = "mask[id, username]"
        _filter = {'users': {'username': utils.query_filter(username)}}
        user = self.list_users(_mask, _filter)
        if len(user) == 1:
            return [user[0]['id']]
        elif len(user) > 1:
            raise exceptions.SoftLayerError("Multiple users found with the name: %s" % username)
        else:
            raise exceptions.SoftLayerError("Unable to find user id for %s" % username)
1205832
def getuser(self, user_id):
        
        request = requests.get(
            '{0}/{1}'.format(self.users_url, user_id),
            headers=self.headers, verify=self.verify_ssl, auth=self.auth, timeout=self.timeout)

        if request.status_code == 200:
            return request.json()
        else:
            return False
678695
def get_account_entitlements_batch(self, user_ids):
        
        route_values = {}
        route_values['action'] = 'GetUsersEntitlements'
        content = self._serialize.body(user_ids, '[str]')
        response = self._send(http_method='POST',
                              location_id='cc3a0130-78ad-4a00-b1ca-49bef42f4656',
                              version='5.0-preview.1',
                              route_values=route_values,
                              content=content)
        return self._deserialize('[AccountEntitlement]', self._unwrap_collection(response))
678519
def post_user_contact_lists(self, id, **data):
        
        
        return self.post("/users/{0}/contact_lists/".format(id), data=data)