Aura.Repos (Aura v0.9.3)
View SourceService module for interacting with Hex repos
๐ Resources
- ๐ Hex
- ๐ Hex API Specifications
- ๐พ hexpm/hex_core
- ๐พ hexpm/hexpm
- ๐ฌ Contact the maintainer (he's happy to help!)
Summary
Functions
@spec get_repo(repo_name :: Aura.Common.repo_name(), opts :: list()) :: {:ok, Aura.Model.HexRepo.t()} | {:error, any()}
Grabs a hex repo associated with a given repo_name
๐ท๏ธ Params
- opts :: option parameters used to modify requests
- repo_name ::
Aura.Common.repo_name/0
๐ป Examples
iex> alias Aura.Repos
iex> repo_url = "http://localhost:4000/api"
iex> {:ok, hexpm} = Repos.get_repo("hexpm", repo_url: repo_url)
iex> hexpm.name
"hexpm"
๐ฉโ๐ป API Details
Method | Path | Controller | Action |
---|---|---|---|
GET | /repos/:repo_name | RepositoryController | :show |
@spec list_repos(opts :: list()) :: {:ok, [Aura.Model.HexRepo.t()]} | {:error, any()}
Grabs hex repos that the user can see
๐ท๏ธ Params
- opts :: option parameters used to modify requests
โคต๏ธ Returns
โ On Success
{:ok, [%HexRepo{...}]}
โ On Failure
{:error, (some error)}
๐ป Examples
iex> alias Aura.Repos
iex> repo_url = "http://localhost:4000/api"
iex> {:ok, [hexpm]} = Repos.list_repos(repo_url: repo_url)
iex> hexpm.name
"hexpm"
๐ฉโ๐ป API Details
Method | Path | Controller | Action |
---|---|---|---|
GET | /repos | RepositoryController | :index |