Tentacat v1.6.0 Tentacat.Repositories View Source
The Repository Webhooks API allows repository admins to manage the post-receive hooks for a repository.
Link to this section Summary
Functions
Create a new repository for the authenticated user
Deleting a repository requires admin access. If OAuth is used, the delete_repo scope is required
List current user's Repositories
List organizations Repositories
List all public repositories
List users Repositories
Link to this section Functions
create(client, repo, options \\ [])
View Source
create(Tentacat.Client.t(), binary(), list()) :: Tentacat.response()
create(Tentacat.Client.t(), binary(), list()) :: Tentacat.response()
Create a new repository for the authenticated user.
Possible values for options
:
- [description: "Simple Elixir wrapper for the GitHub API"]
- [homepage: "http://www.github.com/edgurgel/tentacat"]
- [private: false]
- [has_issues: true]
- [has_wiki: false]
- [has_downloads: true]
- [team_id: 123]
- [auto_init: false]
- [gitignore_template: "Haskell"]
- [license_template: "mit"]j
Example
Tentacat.Repositories.create(client, "tentacat", private: false)
More info at: https://developer.github.com/v3/repos/#create
delete(client, owner, repo)
View Source
delete(Tentacat.Client.t(), binary(), binary()) :: Tentacat.response()
delete(Tentacat.Client.t(), binary(), binary()) :: Tentacat.response()
Deleting a repository requires admin access. If OAuth is used, the delete_repo scope is required.
Example
Tentacat.Repositories.delete("soudqwiggle", "tentacat", client)
More info at: https://developer.github.com/v3/repos/#delete-a-repository
list_mine(client, params \\ [], options \\ []) View Source
List current user's Repositories.
Examples
Tentacat.Repositories.list_mine(client)
Tentacat.Repositories.list_mine(client, type: "owner")
More info at: https://developer.github.com/v3/repos/#list-your-repositories
list_orgs(client \\ %Client{}, org, params \\ [], options \\ []) View Source
List organizations Repositories.
Example
Tentacat.Repositories.list_orgs(client, "elixir-lang")
More info at: https://developer.github.com/v3/repos/#list-organization-repositories
list_public(client \\ %Client{}, params \\ [], options \\ [])
View Source
list_public(Tentacat.Client.t(), Keyword.t(), Keyword.t()) ::
Tentacat.response()
list_public(Tentacat.Client.t(), Keyword.t(), Keyword.t()) :: Tentacat.response()
List all public repositories
Example
Tentacat.Repositories.list_public
Tentacat.Repositories.list_public(client)
More info at: https://developer.github.com/v3/repos/#list-all-public-repositories
list_users(client \\ %Client{}, owner, params \\ [], options \\ [])
View Source
list_users(Tentacat.Client.t(), binary(), Keyword.t(), Keyword.t()) ::
Tentacat.response()
list_users(Tentacat.Client.t(), binary(), Keyword.t(), Keyword.t()) :: Tentacat.response()
List users Repositories.
Example
Tentacat.Repositories.list_users(client, "steve")
More info at: https://developer.github.com/v3/repos/#list-user-repositories
org_create(client, org, repo, options \\ [])
View Source
org_create(Tentacat.Client.t(), binary(), binary(), list()) ::
Tentacat.response()
org_create(Tentacat.Client.t(), binary(), binary(), list()) :: Tentacat.response()
repo_get(client \\ %Client{}, owner, repo, params \\ [])
View Source
repo_get(Tentacat.Client.t(), binary(), binary(), Keyword.t()) ::
Tentacat.response()
repo_get(Tentacat.Client.t(), binary(), binary(), Keyword.t()) :: Tentacat.response()
Get
Example
Tentacat.Repositories.repo_get("elixir-conspiracy", "pacman")
Tentacat.Repositories.repo_get(client, "elixir-conspiracy", "pacman")
More info at: https://developer.github.com/v3/repos/#get