       "#{site()}/repositories/#{repo_xref}/#{path}",
       [{"Authorization", "token #{token}"}] ++ headers,
       params)
+  end
+
+  defp get_next_headers(headers) do
+    headers
+    |> Enum.filter(&(elem(&1, 0) == "Link"))
+    |> Enum.map(&(ExLinkHeader.parse!(elem(&1, 1))))
+    |> Enum.filter(&!is_nil(&1.next))
+  end
+
+  defp get_url_params(url) do
+    case URI.parse(url).query do
+      nil -> []
+      qry -> URI.query_decoder(qry) |> Enum.to_list()
+    end
   end
 
   @token_exp 60

    prs = Poison.decode!(raw)
    |> Enum.map(&BorsNG.GitHub.Pr.from_json!/1)
    |> Enum.concat(append)
    next_headers = headers
    |> Enum.filter(&(elem(&1, 0) == "Link"))
    |> Enum.map(&(ExLinkHeader.parse!(elem(&1, 1))))
    |> Enum.filter(&!is_nil(&1.next))
    case next_headers do
      [] -> prs
      [next] -> get_open_prs_!(token, next.next.url, prs)
    end
  end


    repositories = Poison.decode!(raw)["repositories"]
    |> Enum.map(&BorsNG.GitHub.Repo.from_json!/1)
    |> Enum.concat(append)
    next_headers = get_next_headers(headers)
    case next_headers do
      [] -> repositories
      [next] -> get_installation_repos_!(token, next.next.url, repositories)
