Get all resources and return the result as an array

        Returns:
            array of str: Array of resources
324474
def array(self):
        
        url = "{}/{}".format(__endpoint__, self.type.RESOURCE)
        return RestClient.get(url, self.params)[self.type.RESOURCE]
898994
def _all_resources(self):
        
        queryset = self.__model__.query
        args = {k: v for (k, v) in request.args.items() if k not in ('page', 'export')}
        limit = None
        if args:
            filters = []
            order = []
            for key, value in args.items():
                if value.startswith('%'):
                    filters.append(getattr(self.__model__, key).like(str(value), escape='/'))
                elif key == 'sort':
                    direction = desc if value.startswith('-') else asc
                    order.append(direction(getattr(self.__model__, value.lstrip('-'))))
                elif key == 'limit':
                    limit = int(value)
                elif hasattr(self.__model__, key):
                    filters.append(getattr(self.__model__, key) == value)
                else:
                    raise BadRequestException('Invalid field [{}]'.format(key))
                queryset = queryset.filter(*filters).order_by(*order)
        if 'page' in request.args:
            resources = queryset.paginate(page=int(request.args['page']), per_page=limit).items
        else:
            queryset = queryset.limit(limit)
            resources = queryset.all()
        return [r.to_dict() for r in resources]
552315
async def get_resources(self):
        
        facade = client.ResourcesFacade.from_connection(self.connection)
        response = await facade.ListResources([client.Entity(self.tag)])

        resources = dict()
        for result in response.results:
            for resource in result.charm_store_resources or []:
                resources[resource.name] = resource
            for resource in result.resources or []:
                if resource.charmresource:
                    resource = resource.charmresource
                    resources[resource.name] = resource
        return resources
861663
async def get_instances(self, **kwargs) -> List[ApiResource]:
        """"""
        raw_resources = await self.get_resources(**kwargs)
        _instances = [
            self._resource_factory(_raw)
            for _raw in self._loop_raw(raw_resources)
        ]
        return _instances
262885
def get_resources(cls):
        """"""
        my_plurals = resource_helper.build_plural_mappings(
            {}, RESOURCE_ATTRIBUTE_MAP)
        attributes.PLURALS.update(my_plurals)
        attr_map = RESOURCE_ATTRIBUTE_MAP
        ext_resources = resource_helper.build_resource_info(my_plurals,
                                                            attr_map,
                                                            constants.A10_CERTIFICATE)

        return ext_resources
1318090
def get_all(self):
        
        if not self.vars:
            return self.parent
        if not self.parent:
            return self.vars
        return dict(self.parent, **self.vars)
731380
public function getResources()
    {
        $resources = array();
        foreach ($this->resources as $r) {
            $resources = array_merge($resources, $r);
        }

        return $resources;
    }
695618
def get_all_resources(self):
        
        resources = {}
        resources[
            "genetic_map_HapMapII_GRCh37"
        ] = self.get_genetic_map_HapMapII_GRCh37()
        resources["cytoBand_hg19"] = self.get_cytoBand_hg19()
        resources["knownGene_hg19"] = self.get_knownGene_hg19()
        resources["kgXref_hg19"] = self.get_kgXref_hg19()
        for source, target in itertools.permutations(["NCBI36", "GRCh37", "GRCh38"], 2):
            resources[source + "_" + target] = self.get_assembly_mapping_data(
                source, target
            )
        return resources
1254364
def get_sources(self, resources):
        

        rtype = self.rtype  # E.g. category
        label = self.props.label  # E.g. category1
        result = [
            resource
            for resource in resources.values()
            if is_reference_target(resource, rtype, label)
        ]
        return result
781380
def to_json(self):
        
        return {
            'resourceType': self.resource.resource_type_id,
            'resourceId': self.id,
            'accountId': self.resource.account_id,
            'account': self.account,
            'location': self.resource.location,
            'properties': {to_camelcase(prop.name): prop.value for prop in self.resource.properties},
            'tags': [{'key': t.key, 'value': t.value} for t in self.resource.tags]
        }
1022923
async def get_resources(self, **kwargs) -> dict:
        
        resources = await self.request.get(self._base_path, **kwargs)
        self._sanitize_resources(resources)
        return resources
1151708
def all(self, res):
        ""
        B = get_backend()
        return B.get_objects(B.get_concrete(res))
1301892
def resource_list(self):
        
        self.prune()
        resources = [
            dict(
                name=resource,
                num_total=r_dict['total'],
                num_used=r_dict['used']
            ) for resource, r_dict in six.iteritems(self.resources())]
        if self._resources is not None:
            consumers = collections.defaultdict(dict)
            for task in self._state.get_active_tasks_by_status(RUNNING):
                if task.status == RUNNING and task.resources:
                    for resource, amount in six.iteritems(task.resources):
                        consumers[resource][task.id] = self._serialize_task(task.id, include_deps=False)
            for resource in resources:
                tasks = consumers[resource['name']]
                resource['num_consumer'] = len(tasks)
                resource['running'] = tasks
        return resources
930840
public function toArray(): array
    {
        $resources = [];

        foreach ($this->getResources() as $resource)
        {
            $resources[] = $resource->toArray();
        }

        $data = parent::toArray();

        $data['data'] = $resources;

        return $data;
    }
778303
def list_resources(self, session, query='?*::INSTR'):
        

        # For each session type, ask for the list of connected resources and merge them into a single list.

        resources = self.devices.list_resources()

        resources = rname.filter(resources, query)

        if resources:
            return resources

        raise errors.VisaIOError(errors.StatusCode.error_resource_not_found.value)
757915
def get_resources(url, resource_class, params={})
      get(url, params).map do |result|
        resource_class.from_hash(result, client: self)
      end
    end
474962
def resources_assigned(self) -> List[Resource]:
        """"""
        resources_str = DB.get_hash_value(self.key, 'resources_assigned')
        resources_assigned = []
        for resource in ast.literal_eval(resources_str):
            resources_assigned.append(Resource(resource))
        return resources_assigned