loads a remote resource by id
17441
def load(self, id, *args, **kwargs):
        
        self._pre_load(id, *args, **kwargs)
        response = self._load(id, *args, **kwargs)
        response = self._post_load(response, *args, **kwargs)
        return response
383518
def _load_resource(self):
        """"""

        url = self._url
        if self._params:
            url += '?{0}'.format(six.moves.urllib_parse.urlencode(self._params))

        r = getattr(self._session, self._meta.get_method.lower())(url)

        if r.status_code == 404:
            raise NotFoundException('Server returned 404 Not Found for the URL {0}'.format(self._url))
        elif not 200 <= r.status_code < 400:
            raise HTTPException('Server returned {0} ({1})'.format(r.status_code, r.reason), r)

        data = self._meta.deserializer.to_dict(r.text)
        self.populate_field_values(data)
463674
def _get(cls, resource_id, parent_id, grandparent_id):
        """""""
        client = cls._get_client()
        endpoint = cls._endpoint.format(resource_id=resource_id or "",
                                        parent_id=parent_id or "",
                                        grandparent_id=grandparent_id or "")
        raw_data = client.get_resource(endpoint)
        raw_data["parentResourceID"] = parent_id
        raw_data["grandParentResourceID"] = grandparent_id
        return cls.from_raw_data(raw_data)
1337519
def render_registered(url_id, remote_info):
    
    return template(
        read_index_template(),
        registered=True,
        url=remote_info["url"],
        seeder_data=json.dumps(remote_info),
        url_id=url_id,
    )
932258
def parent(id)
      hash = http_get(url('/resources/%s/parent', id))
      Resource.new(hash) if hash
    end
954135
def get(cls, id, api=None):
        
        id = Transform.to_resource(id)
        api = api if api else cls._API
        if 'get' in cls._URL:
            extra = {'resource': cls.__name__, 'query': {'id': id}}
            logger.info('Fetching {} resource'.format(cls), extra=extra)
            resource = api.get(url=cls._URL['get'].format(id=id)).json()
            return cls(api=api, **resource)
        else:
            raise SbgError('Unable to fetch resource!')
295
def load_remote_system(url, format=None):
    '''
    '''
    filename, headers = urlretrieve(url)
    return load_system(filename, format=format)
73778
async def get_resource(self, resource_id: int) -> dict:
        """"""
        resource = await self.request.get(
            join_path(self._base_path, str(resource_id))
        )
        self._sanitize_resource(self._get_to_actual_data(resource))
        return resource
119217
def load(*args)
      super(*args)
      self.id = self.uri.split('/').last if self.id.nil? and defined? self.uri
    end
833776
public Location load(Serializable id) {
		String sql = "select * from Location where id = ?";
		return getSimpleJdbcTemplate().queryForObject(sql, new LocationMapper(), id);
	}
361010
def _get_resource(resource, name=None, resource_id=None, region=None,
                  key=None, keyid=None, profile=None):
    '''
    
    '''

    if not _exactly_one((name, resource_id)):
        raise SaltInvocationError('One (but not both) of name or id must be '
                                  'provided.')

    conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)

    f = 'get_all_{0}'.format(resource)
    if not f.endswith('s'):
        f = f + 's'
    get_resources = getattr(conn, f)
    filter_parameters = {}

    if name:
        filter_parameters['filters'] = {'tag:Name': name}
    if resource_id:
        filter_parameters['{0}_ids'.format(resource)] = resource_id

    try:
        r = get_resources(**filter_parameters)
    except BotoServerError as e:
        if e.code.endswith('.NotFound'):
            return None
        raise

    if r:
        if len(r) == 1:
            if name:
                _cache_id(name, sub_resource=resource,
                          resource_id=r[0].id,
                          region=region,
                          key=key, keyid=keyid,
                          profile=profile)
            return r[0]
        else:
            raise CommandExecutionError('Found more than one '
                                        '{0} named "{1}"'.format(
                                            resource, name))
    else:
        return None
1352901
def by_id(self, id):
        """"""
        path = partial(_path, self.adapter)
        path = path(id)
        return self._get(path)
1294627
def get_load(jid):
    '''
    
    '''
    options = _get_options(ret=None)
    _response = _request("GET", options['url'] + options['db'] + '/' + jid)
    if 'error' in _response:
        log.error('Unable to get JID "%s" : "%s"', jid, _response)
        return {}
    return {_response['id']: _response}
950597
def get_data(context, id, keys):
    

    if keys:
        keys = keys.split(',')
    result = remoteci.get_data(context, id=id, keys=keys)
    utils.format_output(result, context.format, keys)
725794
def update(self, resource, id_or_uri):
        
        return self._client.update(resource=resource, uri=id_or_uri)
308073
def open_remote(cls, username, password, multifactor_password=None, client_id=None):
        """"""
        blob = cls.fetch_blob(username, password, multifactor_password, client_id)
        return cls.open(blob, username, password)
1123983
def find_by_id(id)
      peer_result = @peer.find(id.to_s)
      peer_result.nil? ? nil : peer_result.proxy
    end