Accepts: list of page ids
    Returns: list of specific page objects
961735
def get_pages_from_id_list(id_list):
    '''
    
    '''
    page_list = []
    for id_ in id_list:
        try:
            page_list.append(
                Page.objects.get(id=id_).specific)
        except ObjectDoesNotExist:
            logging.error(
                "Attempted to fetch non-existent"
                " page with id of {}".format(id_))
    return page_list
1318494
def ids(type, *names)
    name_attr = type_info(type, :name_attr)
    origin_attr = type_info(type, :origin_attr)

    filter = names.map do |n|
      "#{name_attr} eq \"#{n}\""
    end

    attributes = ['id', name_attr, origin_attr]

    all_pages(type, attributes: attributes.join(','), filter: filter.join(' or '))
  end
1265710
def queues(self, page=None, per_page=None, previous=None, prefix=None):
        
        options = {}
        if page is not None:
            raise Exception('page param is deprecated!')
        if per_page is not None:
            options['per_page'] = per_page
        if previous is not None:
            options['previous'] = previous
        if prefix is not None:
            options['prefix'] = prefix

        query = urlencode(options)
        url = 'queues'
        if query != '':
            url = "%s?%s" % (url, query)
        result = self.client.get(url)

        return [queue['name'] for queue in result['body']['queues']]
635028
def get_page_full(self, page_id):
        
        try:
            result = self._request('/getpagefull/',
                                   {'pageid': page_id})
            return TildaPage(**result)
        except NetworkError:
            return []
1260503
def get_page_children_dict(self, page_qs=None):
        
        children_dict = defaultdict(list)
        for page in page_qs or self.pages_for_display:
            children_dict[page.path[:-page.steplen]].append(page)
        return children_dict
576944
def pages(self):
        
        cur = self
        pages = []
        while cur.previous:
            cur = cur.previous
        while cur:
            pages.append(cur)
            cur = cur.next
        return pages
1023932
def parse_page(raw_page):
  
  ret = {"title": get_title(raw_page), "id": get_id(raw_page)}
  if ":" in ret["title"]:
    return None
  ret["revisions"] = get_revisions(raw_page)
  return ret
1054740
def get_all_templates(self, params=None):
        
        if not params:
            params = {}
        return self._iterate_through_pages(self.get_templates_per_page, resource=TEMPLATES, **{'params': params})
1281734
def list_devices(self, shop_id=None, page_index=1, page_size=20):
        
        data = optionaldict(
            shop_id=shop_id,
            pageindex=page_index,
            pagesize=page_size
        )
        res = self._post(
            'device/list',
            data=data,
            result_processor=lambda x: x['data']
        )
        return res
602875
def collections(page = 1, per_page = 10)
      params = {
        page:     page,
        per_page: per_page
      }

      list = JSON.parse(connection.get("/users/#{username}/collections", params).body)
      list.map do |collection|
        Unsplash::Collection.new collection.to_hash
      end
    end
823794
def get_page(self, page_id):
        
        try:
            result = self._request('/getpage/',
                                   {'pageid': page_id})
            return TildaPage(**result)
        except NetworkError:
            return []
408603
def page_list(cls, pages, base_url='/'):
        """"""
        plist = []
        for page in pages:
            url = "<a href=\"{}{}\">{}</a>".format(base_url, cls.slugify(page), page)
            plist.append(url)
        return plist
472148
def filter_pages(pages, pagenum, pagename):
    
    if pagenum:
        try:
            pages = [list(pages)[pagenum - 1]]
        except IndexError:
            raise IndexError('Invalid page number: %d' % pagenum)

    if pagename:
        pages = [page for page in pages if page.name == pagename]
        if pages == []:
            raise IndexError('Page not found: pagename=%s' % pagename)

    return pages
64750
def pages(self):
        
        url = self._build_url('pages', base_url=self._api)
        json = self._json(self._get(url), 200)
        return PagesInfo(json) if json else None
702853
def get_pages(self, label=None):
        """"""
        return (
            page for page in sorted(
                self._pages.values(), key=lambda i: i.created, reverse=True
            ) if ((not label or label in page.labels) and page.visible)
        )
1267594
def get_all_thread_ids(self):
        
        json = self._get_json(self._url.thread_list())
        return [thread['no'] for page in json for thread in page['threads']]
795723
def get_page_tags(page):
    
    from .models import PageTags
    try:
        return page.pagetags.tags.all()
    except PageTags.DoesNotExist:
        return []