View Source ReqHex (req_hex v0.1.1)
Req plugin for Hex.
ReqHex automatically decodes Hex registry resources and tarballs on these endpoints:
https://repo.hex.pm/names
https://repo.hex.pm/versions
https://repo.hex.pm/packages/<package>
https://repo.hex.pm/tarballs/<package>-<version>.tar
Summary
Functions
Runs the plugin.
Functions
Runs the plugin.
Examples
iex> req = Req.new(base_url: "https://repo.hex.pm") |> ReqHex.attach()
iex> Req.get!(req, url: "/versions").body |> Enum.find(& &1.name == "req")
%{
name: "req",
retired: [],
versions: ["0.1.0", "0.1.1", "0.1.2", "0.2.0", "0.2.1", "0.2.2", ...]
}
iex> tarball = Req.get!(req, url: "/tarballs/req-0.1.0.tar").body
iex> tarball["metadata.config"]["links"]
%{"GitHub" => "https://github.com/wojtekmach/req"}