Get an LTI associated with a resource link ID
770031
public function getLtiByRlid($resource_link_id)
    {
        foreach($this->lessons->modules as $mod) {
            if ( ! isset($mod->lti) ) continue;
            foreach($mod->lti as $lti ) {
                if ( $lti->resource_link_id == $resource_link_id) return $lti;
            }
        }
        return null;
    }
585216
def get(self, id_or_uri):
        
        uri = self.build_uri(id_or_uri)
        logger.debug('Get resource (uri = %s, ID = %s)' %
                     (uri, str(id_or_uri)))
        return self._connection.get(uri)
1342793
protected String getResourceId(
            IPortletWindowId portletWindowId, final IPortalRequestInfo portalRequestInfo) {
        final IPortletRequestInfo portletRequestInfo =
                portalRequestInfo.getPortletRequestInfo(portletWindowId);
        if (portletRequestInfo == null) {
            return null;
        }

        return portletRequestInfo.getResourceId();
    }
457923
def get_port_map(self, id_or_uri):
        
        uri = self._client.build_uri(id_or_uri) + self.PORT_MAP_PATH
        return self._client.get(id_or_uri=uri)
1251517
def get_resource_data(incoming_request):
    """"""
    content_type = incoming_request.headers['Content-type'].split(';')[0]
    if ('Content-type' not in incoming_request.headers or
            content_type in JSON_CONTENT_TYPES):
        return incoming_request.json
    elif content_type in HTML_CONTENT_TYPES:
        if not incoming_request.form:
            raise InvalidAPIUsage(400)
        return incoming_request.form
    else:
        # HTTP 415: Unsupported Media Type
        raise InvalidAPIUsage(
            415,
            UNSUPPORTED_CONTENT_TYPE_MESSAGE.format(
                types=incoming_request.headers['Content-type']))
299378
def __get_resource_entry_data(self, bundleId, languageId, resourceKey,
                                  fallback=False):
        
        url = self.__get_base_bundle_url() + '/' + bundleId + '/' \
              + languageId + '/' + resourceKey
        params = {'fallback': 'true'} if fallback else None
        response = self.__perform_rest_call(requestURL=url, params=params)

        if not response:
            return None

        resourceEntryData = response.get(self.__RESPONSE_RESOURCE_ENTRY_KEY)

        return resourceEntryData
390393
def get(cls, resource_id, include_deactivated=False):
        
        if include_deactivated:
            resource = yield cls.view.first(key=resource_id, include_docs=True)
        else:
            resource = yield cls.active_view.first(key=resource_id, include_docs=True)
        parent = cls.parent_resource(**resource['doc'])

        raise Return(cls(parent=parent, **resource['value']))
426493
def get(self, resource_id):
        
        response = self.requester.get(
            '/{endpoint}/{entity}/{id}',
            endpoint=self.endpoint, entity=self.entity, id=resource_id,
            paginate=False
        )
        return response.json()
359837
def get_network_mappings(network_id, network_2_id=None, **kwargs):
    
    qry = db.DBSession.query(ResourceAttrMap).filter(
        or_(
            and_(
                ResourceAttrMap.resource_attr_id_a == ResourceAttr.id,
                ResourceAttr.network_id == network_id),
            and_(
                ResourceAttrMap.resource_attr_id_b == ResourceAttr.id,
                ResourceAttr.network_id == network_id)))

    if network_2_id is not None:
        aliased_ra = aliased(ResourceAttr, name="ra2")
        qry = qry.filter(or_(
            and_(
                ResourceAttrMap.resource_attr_id_a == aliased_ra.id,
                aliased_ra.network_id == network_2_id),
            and_(
                ResourceAttrMap.resource_attr_id_b == aliased_ra.id,
                aliased_ra.network_id == network_2_id)))

    return qry.all()
764440
public static String relativePathFromResourceId(String id) {
        if (id == null) {
            return null;
        }
        String[] paths = id.split("/providers/" + resourceProviderFromResourceId(id) + "/", 2);
        if (paths.length == 1) {
            return "";
        } else {
            return paths[1];
        }
    }
82103
private Integer getPort(String resourcePath, FtpEndpointConfiguration endpointConfiguration) {
        if (resourcePath.contains(":")) {
            return Integer.valueOf(resourcePath.split(":")[1]);
        }

        return endpointConfiguration.getPort();
    }
261133
public static linkset_interface_binding[] get(nitro_service service, String id) throws Exception{
		linkset_interface_binding obj = new linkset_interface_binding();
		obj.set_id(id);
		linkset_interface_binding response[] = (linkset_interface_binding[]) obj.get_resources(service);
		return response;
	}
805287
def resources_to_link(self, resources):
        

        rest_api_id = self.RestApiId
        if isinstance(rest_api_id, dict) and "Ref" in rest_api_id:
            rest_api_id = rest_api_id["Ref"]

        # If RestApiId is a resource in the same template, then we try find the StageName by following the reference
        # Otherwise we default to a wildcard. This stage name is solely used to construct the permission to
        # allow this stage to invoke the Lambda function. If we are unable to resolve the stage name, we will
        # simply permit all stages to invoke this Lambda function
        # This hack is necessary because customers could use !ImportValue, !Ref or other intrinsic functions which
        # can be sometimes impossible to resolve (ie. when it has cross-stack references)
        permitted_stage = "*"
        stage_suffix = "AllStages"
        explicit_api = None
        if isinstance(rest_api_id, string_types):

            if rest_api_id in resources \
               and "Properties" in resources[rest_api_id] \
               and "StageName" in resources[rest_api_id]["Properties"]:

                explicit_api = resources[rest_api_id]["Properties"]
                permitted_stage = explicit_api["StageName"]

                # Stage could be a intrinsic, in which case leave the suffix to default value
                if isinstance(permitted_stage, string_types):
                    if not permitted_stage:
                        raise InvalidResourceException(rest_api_id, 'StageName cannot be empty.')
                    stage_suffix = permitted_stage
                else:
                    stage_suffix = "Stage"

            else:
                # RestApiId is a string, not an intrinsic, but we did not find a valid API resource for this ID
                raise InvalidEventException(self.relative_id, "RestApiId property of Api event must reference a valid "
                                                              "resource in the same template.")

        return {
            'explicit_api': explicit_api,
            'explicit_api_stage': {
                'permitted_stage': permitted_stage,
                'suffix': stage_suffix
            }
        }
347805
def get(self, chargeback_id, **params):
        """"""
        if not chargeback_id or not chargeback_id.startswith(self.RESOURCE_ID_PREFIX):
            raise IdentifierError(
                "Invalid chargeback ID: '{id}'. A chargeback ID should start with '{prefix}'.".format(
                    id=chargeback_id, prefix=self.RESOURCE_ID_PREFIX)
            )
        return super(Chargebacks, self).get(chargeback_id, **params)
8785
private String getUrl(final IRI identifier) {
        return getServices().getResourceService().toExternal(identifier, getBaseUrl()).getIRIString();
    }
988979
function linkedIds(resource, linksKey) {
    return _.compact(_.flatten(_.map(resource, function(obj) {
      return obj.links && obj.links[linksKey];
    })));
  }
149346
def get(cls, resource_id=None, parent_id=None, grandparent_id=None):
        """""""
        return cls._get(resource_id, parent_id, grandparent_id)