Iterate through all pages and return the collected data
        :rtype: list

def _iterate_through_pages(get_function, resource, **kwargs):
        """
        Iterate through all pages and return the collected data
        :rtype: list
        """

        request_data = True
        data = []
        page = 1

        while request_data:
            temp_response = get_function(page=page, **kwargs)
            if temp_response[resource]['@total'] != '0':
                data.append(temp_response)

            page += 1
            if page > int(
                math.ceil(
                    float(temp_response[resource]['@total']) / float(temp_response[resource]['@per_page'])
                )
            ):
                request_data = False
        return data