Retrives all the required resources.
962910
def _get_all(cls, parent_id=None, grandparent_id=None):
        """"""
        client = cls._get_client()
        endpoint = cls._endpoint.format(resource_id="",
                                        parent_id=parent_id or "",
                                        grandparent_id=grandparent_id or "")
        resources = []
        while True:
            response = client.get_resource(endpoint)
            for raw_data in response.get("value", []):
                raw_data["parentResourceID"] = parent_id
                raw_data["grandParentResourceID"] = grandparent_id
                resources.append(cls.from_raw_data(raw_data))
            endpoint = response.get("nextLink")
            if not endpoint:
                break
        return resources
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]
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
511341
def get_all(resource):
    '''  '''
    QUERYSETS = {
        settings.PEOPLE: PeopleQuerySet,
        settings.PLANETS: PlanetQuerySet,
        settings.STARSHIPS: StarshipQuerySet,
        settings.VEHICLES: VehicleQuerySet,
        settings.SPECIES: SpeciesQuerySet,
        settings.FILMS: FilmQuerySet
    }

    urls = all_resource_urls(
        "{0}/{1}/".format(settings.BASE_URL, resource)
    )

    return QUERYSETS[resource](urls)
1341164
def dict(self):
        
        collection = dict(
            page=self.page,
            per_page=self.per_page,
            total_items=self.total_items,
            total_pages=self.total_pages,
            pagination=self.pagination,
            items=list(self.items)
        )
        return collection
1116917
def resources(self):
        """"""
        with open(os.path.join(EULER_DATA, 'resources.json')) as data_file:
            data = json.load(data_file)

        problem_num = str(self.num)

        if problem_num in data:
            files = data[problem_num]

            # Ensure a list of files is returned
            return files if isinstance(files, list) else [files]
        else:
            return None
782876
public static void retrieve(String[] resources) {
        String projectDir = System.getProperty("sitwt.projectDirectory");
        String destDir = (StringUtils.isEmpty(projectDir)) ? "." : projectDir;
        retrieve(resources, new File(destDir));
    }
143668
def GetAllFiles(self):
    
    for filepath in self._files:
      yield filepath

    for dirpath in self._dirs:
      for filepath in ArtifactRegistrySources._GetDirYamlFiles(dirpath):
        if filepath in self._files:
          continue
        yield filepath
504154
def processes(self):
        """"""
        return self._h._get_resources(
            resource=('apps', self.name, 'ps'),
            obj=Process, app=self, map=ProcessListResource
        )
210180
def data(self):
        """"""
        if self._resources is None:
            self.__init()
        if "data" in self._resources:
            url = self._url + "/data"
            return _data.Data(url=url,
                              securityHandler=self._securityHandler,
                              initialize=True,
                              proxy_url=self._proxy_url,
                              proxy_port=self._proxy_port)
        else:
            return None
1252409
def items(self):
        """"""
        if self._result_cache:
            return self._result_cache.items

        return self.all().items
982775
def _get_resources(self, resource, obj, params=None, map=None, **kwargs):
        """"""
        r = self._http_resource('GET', resource, params=params)
        d_items = self._resource_deserialize(r.content.decode("utf-8"))

        items =  [obj.new_from_dict(item, h=self, **kwargs) for item in d_items]

        if map is None:
            map = KeyedListResource

        list_resource = map(items=items)
        list_resource._h = self
        list_resource._obj = obj
        list_resource._kwargs = kwargs

        return list_resource
980848
def all(self):
        
        return self.pages(self.url.page, self.url.max_page)
348491
def parent_resources(cls):
        """"""
        parent = cls.parent_resource
        parents = [parent]

        try:
            while True:
                parent = parent.parent_resource
                parents.append(parent)
        except AttributeError:
            pass

        parents.reverse()
        return parents
1196470
def get_resource_allocation(self):
        
        if hasattr(self, 'resourceAllocation'):
            return ResourceAllocation(self.rest_client.make_request(self.resourceAllocation), self.rest_client)
55503
def resources(self):
        
        resources = []

        for endpoint in self.endpoints:
            resource_type = endpoint.Meta.resource_type
            table = endpoint.Meta.table
            url = endpoint.name

            resources.append((resource_type, {'table': table, 'url': url}))

        return resources
1288827
def memory(self):
        
        return memory.MemoryCollection(
            self._conn, utils.get_subresource_path_by(self, 'Memory'),
            redfish_version=self.redfish_version)