Return a JSON API compliant pagination links section

        If the paginator has a value for a given link then this
        method will also add the same links to the response
        objects `link` header according to the guidance of
        RFC 5988.

        Falcon has a native add_link helper for forming the
        `link` header according to RFC 5988.

        :return:
            dict of links used for pagination

def _serialize_pages(self):
        """ Return a JSON API compliant pagination links section

        If the paginator has a value for a given link then this
        method will also add the same links to the response
        objects `link` header according to the guidance of
        RFC 5988.

        Falcon has a native add_link helper for forming the
        `link` header according to RFC 5988.

        :return:
            dict of links used for pagination
        """

        pages = self.req.pages.to_dict()
        links = {}

        for key, val in pages.items():
            if val:
                params = self.req.params
                params.update(val)
                links[key] = '%s?%s' % (self.req.path, urlencode(params))
                self.resp.add_link(links[key], key)
            else:
                links[key] = val
        return links