GET /v3/users
 用户统计
187513
def users(time_unit, start, duration)
      start = start.strftime(TIME_FORMAT[time_unit.downcase.to_sym])
      duration = build_duration(time_unit.downcase.to_sym, duration)
      params = {
        time_unit: time_unit.upcase,
        start: start,
        duration: duration
      }
      url = base_url + '/users'
      Http::Client.get(@jpush, url, params: params)
    end
56961
def get_users(profile='grafana'):
    '''
    
    '''
    if isinstance(profile, string_types):
        profile = __salt__['config.option'](profile)
    response = requests.get(
        '{0}/api/users'.format(profile['grafana_url']),
        auth=_get_auth(profile),
        headers=_get_headers(profile),
        timeout=profile.get('grafana_timeout', 3),
    )
    if response.status_code >= 400:
        response.raise_for_status()
    return response.json()
1034315
def get_users_list(options={})
      content_type = {'Content-Type' => 'application/json'}
      content_type.merge!(options[:headers]) if options[:headers]

      uri = build_uri("/accounts/#{@acct_id}/users?additional_info=true")

      request = Net::HTTP::Get.new(uri.request_uri, headers(options[:headers]))
      http = initialize_net_http_ssl(uri)
      response = http.request(request)
      generate_log(request, response, uri)

      parsed_response = JSON.parse(response.body)
      (parsed_response || {}).fetch("users", [])
    end
798768
def _get_user(session, slug_or_user_id):
        
        user_json_items = session.fetch('users.get', user_ids=slug_or_user_id, fields=User.USER_FIELDS)
        return User.from_json(session, user_json_items[0])
1062175
def get_single_group_membership_users(self, user_id, group_id):
        
        path = {}
        data = {}
        params = {}

        # REQUIRED - PATH - group_id
        """ID"""
        path["group_id"] = group_id

        # REQUIRED - PATH - user_id
        """ID"""
        path["user_id"] = user_id

        self.logger.debug("GET /api/v1/groups/{group_id}/users/{user_id} with query params: {params} and form data: {data}".format(params=params, data=data, **path))
        return self.generic_request("GET", "/api/v1/groups/{group_id}/users/{user_id}".format(**path), data=data, params=params, single_item=True)
856405
def get_current_user(self, **params):
        """"""
        response = self._get('v2', 'user', params=params)
        return self._make_api_object(response, CurrentUser)
1096563
def get_user_data(self, subid, params=None):
        ''' 
        '''
        params = update_params(params, {'SUBID': subid})
        return self.request('/v1/server/get_user_data', params, 'GET')
323031
def getent(refresh=False):
    '''
    
    '''
    if 'user.getent' in __context__ and not refresh:
        return __context__['user.getent']

    ret = []
    for data in pwd.getpwall():
        ret.append(info(data.pw_name))
    __context__['user.getent'] = ret
    return ret
1070470
def get_user(self, username):
        """"""
        ret = {}
        tmp = self._get_user(self._byte_p2(username), ALL_ATTRS)
        if tmp is None:
            raise UserDoesntExist(username, self.backend_name)
        attrs_tmp = tmp[1]
        for attr in attrs_tmp:
            value_tmp = attrs_tmp[attr]
            if len(value_tmp) == 1:
                ret[attr] = value_tmp[0]
            else:
                ret[attr] = value_tmp
        return ret
675633
def get_users(self, usernames):

        

        if self.standard_grant_type is not "authorization_code":
            raise DeviantartError("Authentication through Authorization Code (Grant Type) is required in order to connect to this endpoint.")

        response = self._req('/user/whois', post_data={
            "usernames":usernames
        })

        users = []

        for item in response['results']:
            u = User()
            u.from_dict(item)
            users.append(u)

        return users
815436
def get_user(self, username=None, params=None):
        
        return self.transport.perform_request(
            "GET", _make_path("_security", "user", username), params=params
        )
197728
public function getUsers($opts = [])
    {
        $query = '';
        
        if(isset($opts['search'])) $query .= '?search='.$opts['search'];
        
    	$endpoint = '/users'.$query;        
    	return $this->doRequest('GET', $endpoint);
    }
681808
def getent(refresh=False):
    '''
    
    '''
    if 'user.getent' in __context__ and not refresh:
        return __context__['user.getent']

    ret = []
    for data in pwd.getpwall():
        ret.append(_format_info(data))
    __context__['user.getent'] = ret
    return ret
1203734
def obtain_users(access = nil)
      admins = obtain_users
      if access.is_a?(Array)
        admins = admins.where(:id => access) if !access.blank?
      else
        admins = admins.where(:access_level => access) if !access.blank?
      end

      admins
    end
1198012
def get_user(self, username="~"):
        
        url = self._build_url("users/%s/" % username, _prepend_namespace=False)
        response = self._get(url)
        check_response(response)
        return response
341325
def get_user(self, uid):
		""""""
		
		r = requests.get(api_url+'users/'+str(uid)+'/', headers=self.headers)
		print(request_status(r))
		r.raise_for_status()
		return User(r.json())
941056
def system_find_users(input_params={}, always_retry=True, **kwargs):
    
    return DXHTTPRequest('/system/findUsers', input_params, always_retry=always_retry, **kwargs)