Get a user delivery server
503325
def get_user_deliveryserver(self, domainid, serverid):
        """"""
        return self.api_call(
            ENDPOINTS['userdeliveryservers']['get'],
            dict(domainid=domainid, serverid=serverid))
548151
def get_server(key, server=MAIN_SERVER, servers=LOAD_SERVERS):

    

    namecoind = NamecoindClient(NAMECOIND_SERVER, NAMECOIND_PORT,
                                NAMECOIND_USER, NAMECOIND_PASSWD)

    info = namecoind.name_show(key)

    if 'address' in info:
        return check_address(info['address'], server, servers)

    response = {}
    response["registered"] = False
    response["server"] = None
    response["ismine"] = False
    return response
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')
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())
486338
final public function deliver()
    {
        $action_ns = 'Moxl\Xec\Action';
        if(get_parent_class($this) == $action_ns
        || get_parent_class(get_parent_class($this)) == $action_ns) {
            $class = str_replace([$action_ns, '\\'], ['', '_'], get_class($this));
            $key = strtolower(substr($class, 1));
        } else {
            $class = strtolower(get_class($this));
            $pos = strrpos($class, '\\');
            $key = substr($class, $pos + 1);
        }
        if($this->method)
            $key = $key . '_' . $this->method;

        if(!empty($this->packet->from)) {
            Utils::log('Package : "'.$key.'" from "'.$this->packet->from.'" fired');
        } else {
            Utils::log('Package : "'.$key);
        }

        $this->event($key, $this->packet);
    }
440276
def register_deliver_command(self, deliver_func):
        
        description = "Initiate delivery of a project to another user. Removes other user's current permissions. " \
                      "Send message to D4S2 service to send email and allow access to the project once user " \
                      "acknowledges receiving the data."
        deliver_parser = self.subparsers.add_parser('deliver', description=description)
        add_project_name_or_id_arg(deliver_parser)
        user_or_email = deliver_parser.add_mutually_exclusive_group(required=True)
        add_user_arg(user_or_email)
        add_email_arg(user_or_email)
        add_share_usernames_arg(deliver_parser)
        add_share_emails_arg(deliver_parser)
        _add_copy_project_arg(deliver_parser)
        _add_resend_arg(deliver_parser, "Resend delivery")
        include_or_exclude = deliver_parser.add_mutually_exclusive_group(required=False)
        _add_include_arg(include_or_exclude)
        _add_exclude_arg(include_or_exclude)
        _add_message_file(deliver_parser, "Filename containing a message to be sent with the delivery. "
                                          "Pass - to read from stdin.")
        deliver_parser.set_defaults(func=deliver_func)
732301
def servers(self):
        """"""
        url = "%s/servers" % self.root
        return Servers(url=url,
                       securityHandler=self._securityHandler,
                       proxy_url=self._proxy_url,
                       proxy_port=self._proxy_port)
551465
def get_user(self, userPk):
        """"""
        r = self._request('user/' + str(userPk))
        if r:
            # Set base properties and copy data inside the user
            u = User()
            u.pk = u.id = userPk
            u.__dict__.update(r.json())
            return u
        return None
791176
def get_shipment(self, resource_id):
        """"""
        return Shipments(self.client).on(self).get(resource_id)
1112408
def get_user():
    '''
    
    '''
    if HAS_PWD:
        ret = pwd.getpwuid(os.geteuid()).pw_name
    elif HAS_WIN_FUNCTIONS and salt.utils.win_functions.HAS_WIN32:
        ret = salt.utils.win_functions.get_current_user()
    else:
        raise CommandExecutionError(
            'Required external library (pwd or win32api) not installed')
    return salt.utils.stringutils.to_unicode(ret)
76021
def _get(self):
        '''
        

        '''
        user = self.USER
        try:
            uid = pwd.getpwnam(user).pw_uid
        except KeyError:
            log.info('User does not exist')
            return False

        cmd = self.gsetting_command + ['get', str(self.SCHEMA), str(self.KEY)]
        environ = {}
        environ['XDG_RUNTIME_DIR'] = '/run/user/{0}'.format(uid)
        result = __salt__['cmd.run_all'](cmd, runas=user, env=environ, python_shell=False)

        if 'stdout' in result:
            if 'uint32' in result['stdout']:
                return re.sub('uint32 ', '', result['stdout'])
            else:
                return result['stdout']
        else:
            return False
293751
def server
    reply = json_get(target, '/login', key_style)
    return reply if reply && (reply[:prompts] || reply['prompts'])
    raise BadResponse, "Invalid response from target #{target}"
  end
1083743
def grab_server(self, onerror = None):
        """"""
        request.GrabServer(display = self.display,
                           onerror = onerror)
1190952
def get_client(key, project):
    """"""
    cred = get_storage_credentials(key)
    return storage.Client(project=project, credentials=cred)
1035745
def api_user(request, userPk, key=None, hproPk=None):
    """"""

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

    if settings.PIAPI_STANDALONE:
        if not settings.PIAPI_REALUSERS:
            user = generate_user(pk=userPk)
            if user is None:
                return HttpResponseNotFound()
        else:
            user = get_object_or_404(DUser, pk=userPk)

        hproject = None
    else:
        from users.models import TechUser

        user = get_object_or_404(TechUser, pk=userPk)

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

        user.ebuio_member = hproject.isMemberRead(user)
        user.ebuio_admin = hproject.isMemberWrite(user)
        user.subscription_labels = _get_subscription_labels(user, hproject)

    retour = {}

    # Append properties for the user data
    for prop in settings.PIAPI_USERDATA:
        if hasattr(user, prop):
            retour[prop] = getattr(user, prop)

    retour['id'] = str(retour['pk'])

    # Append the users organisation and access levels
    orgas = {}
    if user:
        limitedOrgas = []

        if hproject and hproject.plugItLimitOrgaJoinable:
            # Get List of Plugit Available Orgas first
            projectOrgaIds = hproject.plugItOrgaJoinable.order_by('name').values_list('pk', flat=True)
            for (orga, isAdmin) in user.getOrgas(distinct=True):
                if orga.pk in projectOrgaIds:
                    limitedOrgas.append((orga, isAdmin))
        elif hasattr(user, 'getOrgas'):
            limitedOrgas = user.getOrgas(distinct=True)

        # Create List
        orgas = [{'id': orga.pk, 'name': orga.name, 'codops': orga.ebu_codops, 'is_admin': isAdmin} for (orga, isAdmin)
                 in limitedOrgas]
    retour['orgas'] = orgas

    return HttpResponse(json.dumps(retour), content_type="application/json")
214279
def get_user_orders(self):
        
        self._log('get user orders')
        return self._rest_client.post(
            endpoint='/open_orders',
            payload={'book': self.name}
        )
913697
public function deliveryExecutions()
    {
        $dataTable = new DeliveriesMonitorDatatable($this->getCurrentDelivery(), $this->getRequest());
        $this->getServiceManager()->propagate($dataTable);
        $this->returnJson($dataTable);
    }