def get_pagination(raw_link_header):
    link_map = {}
    for link, rel in (lh.split(';') for lh in raw_link_header.split(',')):
        link_map[rel.split('=')[1].strip('"')] = link.strip(' <>')
    return Pagination(*(link_map.get(f) for f in Pagination._fields))