Returns first page if no params passed in as a list.
195201
def all(cls, connection=None, **params):
        

        request = cls._make_request('GET', cls._get_all_path(), connection, params=params)
        return cls._create_object(request, connection=connection)
272588
def get_all_incoming_properties(self, params=None):
        
        if not params:
            params = {}
        return self._iterate_through_pages(
            self.get_incoming_properties_per_page,
            resource=INCOMING_PROPERTIES,
            **{'params': params}
        )
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
879905
protected function get_firstpage() {
        $pages = $this->load_all_pages();
        if (count($pages) > 0) {
            foreach ($pages as $page) {
                if ((int)$page->prevpageid === 0) {
                    return $page;
                }
            }
        }
        return false;
    }
1055541
def _base_get_list(self, url, limit=None, *, query=None, order_by=None,
                       batch=None):
        

        if limit is None or limit > self.protocol.max_top_value:
            batch = self.protocol.max_top_value

        params = {'$top': batch if batch else limit}

        if order_by:
            params['$orderby'] = order_by

        if query:
            if query.has_filters:
                warnings.warn(
                    'Filters are not allowed by the Api Provider '
                    'in this method')
                query.clear_filters()
            if isinstance(query, str):
                params['$filter'] = query
            else:
                params.update(query.as_params())

        response = self.con.get(url, params=params)
        if not response:
            return iter(())

        data = response.json()

        # Everything received from cloud must be passed as self._cloud_data_key
        items = (
            self._classifier(item)(parent=self, **{self._cloud_data_key: item})
            for item in data.get('value', []))
        next_link = data.get(NEXT_LINK_KEYWORD, None)
        if batch and next_link:
            return Pagination(parent=self, data=items,
                              constructor=self._classifier,
                              next_link=next_link, limit=limit)
        else:
            return items
1109837
def firstAnnot(self):
        """"""
        CheckParent(self)

        val = _fitz.Page_firstAnnot(self)
        if val:
            val.thisown = True
            val.parent = weakref.proxy(self) # owning page object
            self._annot_refs[id(val)] = val

        return val
292674
def get_page(self, index=None):
        """"""
        if index is None:
            widget = self.pages_widget.currentWidget()
        else:
            widget = self.pages_widget.widget(index)
        return widget.widget()
932689
def next_page(self):
        
        try:
            next_url = self.next_url
        except AttributeError:
            raise PageError("Page %r has no next page" % self)
        return self.page_for_url(next_url)
504805
def list_subdomains_previous_page(self):
        
        uri = self._paging.get("subdomain", {}).get("prev_uri")
        if uri is None:
            raise exc.NoMoreResults("There are no previous pages of subdomains "
                    "to list.")
        return self._list_subdomains(uri)
420778
def get_list(self, size=100, startIndex=0, searchText="", sortProperty="", sortOrder='ASC', status='Active,Pending'):
        

        url = urljoin(BASEURL, "sites", "list")

        params = {
            'api_key': self.token,
            'size': size,
            'startIndex': startIndex,
            'sortOrder': sortOrder,
            'status': status
        }

        if searchText:
            params['searchText'] = searchText

        if sortProperty:
            params['sortProperty'] = sortProperty

        r = requests.get(url, params)
        r.raise_for_status()
        return r.json()
1007751
def get_list(
        self,
        search='',
        start=0,
        limit=0,
        order_by='',
        order_by_dir='ASC',
        published_only=False,
        minimal=False
    ):
        

        parameters = {}
        args = ['search', 'start', 'limit', 'minimal']
        for arg in args:
            if arg in locals() and locals()[arg]:
                parameters[arg] = locals()[arg]
        if order_by:
            parameters['orderBy'] = order_by
        if order_by_dir:
            parameters['orderByDir'] = order_by_dir
        if published_only:
            parameters['publishedOnly'] = 'true'
        response = self._client.session.get(
            self.endpoint_url, params=parameters
        )
        return self.process_response(response)
719197
def first(self):
        

        if self.total and self.limit < self.total:
            return {'page[offset]': 0, 'page[limit]': self.limit}
        else:
            return None
1109668
public int getNextPage(int prevPage) {
		reportFreePage(prevPage);
		
		if (iter.hasNextULL()) {
			//ArrayList<Long> toDelete = new ArrayList<>();
			LongLongIndex.LLEntry e = iter.nextULL();
			long pageId = e.getKey();
			long value = e.getValue();
			
			// do not return pages that are PID_DO_NOT_USE.
			while ((value > maxFreeTxId || value < 0) && iter.hasNextULL()) {
				if (value < 0 && ((-value) <= maxFreeTxId)) {
					//optimisation:, collect in list and remove later?
					toDelete.add((int)pageId);
//					idx.removeLong(pageId);
//					//idx.insertLong(pageId, -currentTxId);
//					iter.close();
//					iter = (LLIterator) idx.iterator(pageId+1, Long.MAX_VALUE);
					//idx.removeLong(pageId, value);
					//TODO or implement iter.remove() ?!
				}
				e = iter.nextULL();
				pageId = e.getKey();
				value = e.getValue();
			}
//			if (!toDelete.isEmpty()) {
//				for (Long l: toDelete) {
//					idx.removeLong(l);
//				}
//			}
			if (value >= 0 && value <= maxFreeTxId) {
				//TODO or implement iter.updateValue() ?!
				//idx.removeLong(pageId);
				idx.insertLong(pageId, -currentTxId);
				iter.close();
				iter = idx.iterator(pageId+1, Long.MAX_VALUE);
				return (int) pageId;
			}
//			if (!toDelete.isEmpty()) {
//				iter.close();
//				iter = (LLIterator) idx.iterator(pageId+1, Long.MAX_VALUE);
//			}
		}
		
		//If we didn't find any we allocate a new page.
		return lastPage.addAndGet(1);
	}
5331
def list_pages(location_id, opts = {})
      data, _status_code, _headers = list_pages_with_http_info(location_id, opts)
      return data
    end
153126
public @NotNull List<Page> getPages() {
    return getPages((Predicate<Page>)null, (Page)null);
  }
1144099
public T first(String param) {
        List<T> items = parts.get(param);
        if (items == null) return null;
        return items.get(0);
    }
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