Get all tags of reminder
        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 reminder_id: the reminder id
        :return: list
776666
def get_all_tags_of_reminder(self, reminder_id):
        
        return self._iterate_through_pages(
            get_function=self.get_tags_of_reminder_per_page,
            resource=REMINDER_TAGS,
            **{'reminder_id': reminder_id}
        )
615719
def get_tags_of_credit_note_per_page(self, credit_note_id, per_page=1000, page=1):
        
        return self._get_resource_per_page(
            resource=CREDIT_NOTE_TAGS,
            per_page=per_page,
            page=page,
            params={'credit_note_id': credit_note_id},
        )
1294407
def fetchPlanInfo(self, plan_id):
        
        data = {"event_reminder_id": plan_id}
        j = self._post(self.req_url.PLAN_INFO, data, fix_request=True, as_json=True)
        return Plan._from_fetch(j["payload"])
494249
def tags(self, ticket_id):
        
        return self._query_zendesk(self.endpoint.tags, 'tag', id=ticket_id)
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},
        )
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}
        )
1188194
def list_all_after(self, message_id, limit=None):
        
        return self.list_after(message_id, limit=limit).autopage()
451099
def reminders_complete(self, *, reminder: str, **kwargs) -> SlackResponse:
        
        self._validate_xoxp_token()
        kwargs.update({"reminder": reminder})
        return self.api_call("reminders.complete", json=kwargs)
1368531
def get_all_tags_of_letter(self, letter_id):
        
        return self._iterate_through_pages(
            get_function=self.get_tags_of_letter_per_page,
            resource=LETTER_TAGS,
            **{'letter_id': letter_id}
        )
385393
def get_all_recurrings(self, params=None):
        
        if not params:
            params = {}
        return self._iterate_through_pages(self.get_recurrings_per_page, resource=RECURRINGS, **{'params': params})
470701
def list_notes(self, page=0, since=None):
        
        from highton.models.note import Note
        params = {'n': int(page) * self.NOTES_OFFSET}
        if since:
            params['since'] = since.strftime(self.COLLECTION_DATETIME)

        return fields.ListField(
            name=self.ENDPOINT,
            init_class=Note
        ).decode(
            self.element_from_string(
                self._get_request(
                    endpoint=self.ENDPOINT + '/' + str(self.id) + '/' + Note.ENDPOINT,
                    params=params
                ).text
            )
        )
301623
def get_links(self, recall, timeout):
        
        for _ in range(recall):
            try:  # setting timeout
                soup = BeautifulSoup(self.source)  # parse source
                out_links = []

                for tag in soup.findAll(["a", "link"], href=True):
                    tag["href"] = urljoin(self.url, tag["href"])
                    out_links.append(tag["href"])

                return sorted(out_links)  # sort array
            except:
                time.sleep(timeout)
213556
def reminders_info(self, *, reminder: str, **kwargs) -> SlackResponse:
        
        self._validate_xoxp_token()
        kwargs.update({"reminder": reminder})
        return self.api_call("reminders.info", http_verb="GET", params=kwargs)
571686
def list_all_before(self, message_id, limit=None):
        
        return self.list_before(message_id, limit=limit).autopage()
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},
        )
1340656
def list(self, include_claimed=False, echo=False, marker=None, limit=None):
        
        return self._iterate_list(include_claimed=include_claimed, echo=echo,
                marker=marker, limit=limit)
976405
def _retrieve_items(self, num_items, params, item_type="events", page=0):
        
        try:
            page = page
            retries = 0
            item_list = []
            remaining = num_items
            list_name = "eventResourceList" if item_type == "events" else "alarms"
            if not params:
                params = {}
            # Loop if num_items > MAX_EVENTS as that is the max number of items in one page
            while remaining and page < (num_items//MAX_EVENTS+1) and retries < MAX_RETRIES:
                params["page"] = page
                params["size"] = min(remaining, MAX_EVENTS)
                #response = self.client.get(self.url+item_type, params=params, verify=False)
                response = self.client.get(self.url+item_type, params=params)
                if response.status_code == 200:
                    self.log.warning("Got 200. Page info: {}.".format(response.json()['page']))
                    page += 1
                    retries = 0
                    items = response.json()['_embedded'][list_name]
                    item_list.extend(items)
                    remaining = min(remaining, response.json()['page']['totalElements'])
                    remaining -= len(items)
                else:
                    retries += 1
                    self.log.error("Got response {response.status_code} for page {params['page']} " + \
                                   "and size {params['size']}. Attempt {retries}.")
                    time.sleep(1)
            return item_list

        except TokenExpiredError as e:
            self.log.error("ERROR: {e}. Token Expired.")
            self.client = self._connect()
            return self._retrieve_items(remaining, params, item_type, page)

        except KeyError as e:
            self.log.error("ERROR: {e}. {response.json()['_links']}")
            return []