Get all tags of incoming
        This will iterate over all pages until it gets all elements.
        So if the rate limit exceeded it will throw an Exception and you will get nothing

        :param incoming_id: the incoming id
        :return: list
354561
def get_all_tags_of_incoming(self, incoming_id):
        
        return self._iterate_through_pages(
            get_function=self.get_tags_of_incoming_per_page,
            resource=INCOMING_TAGS,
            **{'incoming_id': incoming_id}
        )
348963
def fetch(self, pageNum, itemsPerPage):
        
        return self.get_all_alerts(self.status, pageNum, itemsPerPage)
734072
def all(self):
        
        page = self._load(self.href)
        while True:
            try:
                for item in page._items:
                    yield item
                page = page.next_page()
            except PaginationError:
                break
315448
def get_all_payments_of_incoming(self, incoming_id):
        
        return self._iterate_through_pages(
            get_function=self.get_payments_of_incoming_per_page,
            resource=INCOMING_PAYMENTS,
            **{'incoming_id': incoming_id}
        )
146223
def list_documents(self, limit=None):
        
        limit_str = ''
        if limit:
            try:
                limit_str = 'LIMIT {}'.format(int(limit))
            except (TypeError, ValueError):
                pass

        query = ('SELECT identifier FROM identifier_index ' + limit_str)

        for row in self.backend.library.database.connection.execute(query).fetchall():
            yield row['identifier']
829166
def get_all_items_of_offer(self, offer_id):
        
        return self._iterate_through_pages(
            get_function=self.get_items_of_offer_per_page,
            resource=OFFER_ITEMS,
            **{'offer_id': offer_id}
        )
696824
def do_requests_to_getall(self, uri, requested_count):
        
        items = []

        while uri:
            logger.debug('Making HTTP request to get all resources. Uri: {0}'.format(uri))
            response = self._connection.get(uri)
            members = self.get_members(response)
            items += members

            logger.debug("Response getAll: nextPageUri = {0}, members list length: {1}".format(uri, str(len(members))))
            uri = self.get_next_page(response, items, requested_count)

        logger.debug('Total # of members found = {0}'.format(str(len(items))))
        return items
1094632
def get_tags_of_reminder_per_page(self, reminder_id, per_page=1000, page=1):
        
        return self._get_resource_per_page(
            resource=REMINDER_TAGS,
            per_page=per_page,
            page=page,
            params={'reminder_id': reminder_id},
        )
42590
def list(self, page=1, per_page=50):
        
        data = {"page": page,
                "per_page": per_page}
        return self.get(self.base_url, data=data)
1037439
def get_tags_users(self, id_):
    
    return _get_request(_TAGS_USERS.format(c_api=_C_API_BEGINNING,
                                                                      api=_API_VERSION,
                                                                      id_=id_,
                                                                      at=self.access_token))
562970
def GetFeeds(client):
  
  feed_service = client.GetService('FeedService', 'v201809')

  feeds = []
  more_pages = True

  selector = {
      'fields': ['Id', 'Name', 'Attributes'],
      'predicates': [
          {
              'field': 'Origin',
              'operator': 'EQUALS',
              'values': ['USER']
          },
          {
              'field': 'FeedStatus',
              'operator': 'EQUALS',
              'values': ['ENABLED']
          }
      ],
      'paging': {
          'startIndex': 0,
          'numberResults': PAGE_SIZE
      }
  }

  while more_pages:
    page = feed_service.get(selector)

    if 'entries' in page:
      feeds.extend(page['entries'])

    selector['paging']['startIndex'] += PAGE_SIZE
    more_pages = selector['paging']['startIndex'] < int(page['totalNumEntries'])

  return feeds
305205
def get(self, id):
        ''''''
        args = parser.parse_args()
        model = self.model.objects.only('id').get_or_404(id=id)
        qs = Follow.objects(following=model, until=None)
        return qs.paginate(args['page'], args['page_size'])
277969
def get_tags_of_invoice_per_page(self, invoice_id, per_page=1000, page=1):
        
        return self._get_resource_per_page(
            resource=INVOICE_TAGS,
            per_page=per_page,
            page=page,
            params={'invoice_id': invoice_id},
        )
1118468
def get_top_tags(self, limit=None, cacheable=True):
        

        params = self._get_params()
        if limit:
            params["limit"] = limit

        doc = self._request(self.ws_prefix + ".getTopTags", cacheable, params)

        seq = []
        for node in doc.getElementsByTagName("tag"):
            seq.append(
                TopItem(
                    Tag(_extract(node, "name"), self.network), _extract(node, "count")
                )
            )

        return seq
784021
def _get_page_elements(self):
        
        page_elements = []
        for attribute, value in list(self.__dict__.items()) + list(self.__class__.__dict__.items()):
            if attribute != 'parent' and isinstance(value, CommonObject):
                page_elements.append(value)
        return page_elements
99691
def load_tags(self, max_pages=30):
        
        logger.info("loading tags")

        # clear them all out so we don't get dupes if requested
        if self.purge_first:
            Tag.objects.filter(site_id=self.site_id).delete()

        path = "sites/{}/tags".format(self.site_id)
        params = {"number": 1000}
        page = 1

        response = self.get(path, params)

        if not response.ok:
            logger.warning("Response NOT OK! status_code=%s\n%s", response.status_code, response.text)

        while response.ok and response.text and page < max_pages:
            logger.info(" - page: %d", page)

            api_tags = response.json().get("tags")
            if not api_tags:
                # we're done here
                break

            tags = []
            for api_tag in api_tags:

                # if it exists locally, update local version if anything has changed
                existing_tag = Tag.objects.filter(site_id=self.site_id, wp_id=api_tag["ID"]).first()
                if existing_tag:
                    self.update_existing_tag(existing_tag, api_tag)
                else:
                    tags.append(self.get_new_tag(api_tag))

            if tags:
                Tag.objects.bulk_create(tags)
            elif not self.full:
                # we're done here
                break

            # get next page
            page += 1
            params["page"] = page
            response = self.get(path, params)

            if not response.ok:
                logger.warning("Response NOT OK! status_code=%s\n%s", response.status_code, response.text)
                return
1370737
def get_all_items_of_recurring(self, recurring_id):
        
        return self._iterate_through_pages(
            get_function=self.get_items_of_recurring_per_page,
            resource=RECURRING_ITEMS,
            **{'recurring_id': recurring_id}
        )