Get all tags of invoice
        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 invoice_id: the invoice id
        :return: list
774214
def get_all_tags_of_invoice(self, invoice_id):
        
        return self._iterate_through_pages(
            get_function=self.get_tags_of_invoice_per_page,
            resource=INVOICE_TAGS,
            **{'invoice_id': invoice_id}
        )
13229
def get_tags_of_article_per_page(self, article_id, per_page=1000, page=1):
        
        return self._get_resource_per_page(
            resource=ARTICLE_TAGS,
            per_page=per_page,
            page=page,
            params={'article_id': article_id},
        )
18911
def list_tags(self):
        
        from highton.models.tag import Tag
        return fields.ListField(
            name=self.ENDPOINT,
            init_class=Tag
        ).decode(
            self.element_from_string(
                self._get_request(
                    endpoint=self.ENDPOINT + '/' + str(self.id) + '/' + Tag.ENDPOINT,
                ).text
            )
        )
278601
def invoice_paid?(invoicenumber)
      # Find invoice
      invoice = Twinfield::Process.new(@session).
        request(:process_xml_document, get_dimension_xml(@company, { invoicenumber: invoicenumber })).
        body[:process_xml_document_response][:process_xml_document_result]

      # Find corresponding transaction
      transaction = find_transaction(invoice[:salesinvoice][:financials][:number])

      begin
        if transaction && transaction[:transaction][:lines][:line].first[:matchstatus] == 'matched'
          true
        else
          false
        end
      rescue
        false
      end
    end
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},
        )
635028
def get_page_full(self, page_id):
        
        try:
            result = self._request('/getpagefull/',
                                   {'pageid': page_id})
            return TildaPage(**result)
        except NetworkError:
            return []
156369
def get_all_comments_of_incoming(self, incoming_id):
        
        return self._iterate_through_pages(
            get_function=self.get_comments_of_incoming_per_page,
            resource=INCOMING_COMMENTS,
            **{'incoming_id': incoming_id}
        )
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}
        )
78968
def get_tags_of_recurring_per_page(self, recurring_id, per_page=1000, page=1):
        
        return self._get_resource_per_page(
            resource=RECURRING_TAGS,
            per_page=per_page,
            page=page,
            params={'recurring_id': recurring_id},
        )
401823
def get_tags(model, trigger_id):
    
    # get the data of this trigger
    trigger = model.objects.get(trigger_id=trigger_id)

    tags = ''
    if trigger.tag:
        # is there several tag ?
        tags = ["#" + tag.strip() for tag in trigger.tag.split(',')]
        tags = str(','.join(tags)) if isinstance(tags, list) else tags
        tags = ' ' + tags
    return tags
508914
def get_top_tags(self, limit=None, cacheable=True):
        """"""

        # Last.fm has no "limit" parameter for tag.getTopTags
        # so we need to get all (250) and then limit locally
        doc = _Request(self, "tag.getTopTags").execute(cacheable)

        seq = []
        for node in doc.getElementsByTagName("tag"):
            if limit and len(seq) >= limit:
                break
            tag = Tag(_extract(node, "name"), self)
            weight = _number(_extract(node, "count"))
            seq.append(TopItem(tag, weight))

        return seq
1002513
def get_invoice(invoice_id_or_number, format = :xml)
      request_params = {}
      headers        = {}

      headers.merge!("Accept" => "application/pdf") if format == :pdf

      url  = "#{@xero_url}/Invoices/#{CGI.escape(invoice_id_or_number)}"

      response = http_get(@client, url, request_params, headers)

      if format == :pdf
        Tempfile.open(invoice_id_or_number) do |f|
          f.write(response)
          f
        end
      else
        parse_response(response, {:request_params => request_params}, {:request_signature => 'GET/Invoice'})
      end
    end
84633
def get(self, tags=[], trigger_ids=[]):
        
        params = {}
        if len(tags) > 0:
            params['tags'] = ','.join(tags)

        if len(trigger_ids) > 0:
            params['triggerIds'] = ','.join(trigger_ids)

        url = self._service_url('triggers', params=params)
        triggers_dict = self._get(url)
        return Trigger.list_to_object_list(triggers_dict)
281984
def get_tags_of_delivery_note_per_page(self, delivery_note_id, per_page=1000, page=1):
        
        return self._get_resource_per_page(
            resource=DELIVERY_NOTE_TAGS,
            per_page=per_page,
            page=page,
            params={'delivery_note_id': delivery_note_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']
494249
def tags(self, ticket_id):
        
        return self._query_zendesk(self.endpoint.tags, 'tag', id=ticket_id)
1053623
def _fetch_all(cls, api_key, endpoint=None, offset=0, limit=25, **kwargs):
        
        output = []
        qp = kwargs.copy()
        limit = max(1, min(100, limit))
        maximum = kwargs.get('maximum')
        qp['limit'] = min(limit, maximum) if maximum is not None else limit
        qp['offset'] = offset
        more, total = None, None

        while True:
            entities, options = cls._fetch_page(
                api_key=api_key, endpoint=endpoint, **qp
            )
            output += entities
            more = options.get('more')
            limit = options.get('limit')
            offset = options.get('offset')
            total = options.get('total')

            if more is None:
                if total is None or offset is None:
                    break
                more = (limit + offset) < total

            if not more or (maximum is not None and len(output) >= maximum):
                break

            qp['limit'] = limit
            qp['offset'] = offset + limit

        return output