Package com.jcabi.github
Interface Repos
-
@Immutable public interface Repos
Github Repo API.- Since:
- 0.5
- Version:
- $Id: 7a994514f14522a5c35ba73a5614b31cc3312895 $
- Author:
- Yegor Bugayenko (yegor256@gmail.com)
- See Also:
- Repos API
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Repos.RepoCreate
Settings to use when creating a new GitHub repository.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Repo
create(Repos.RepoCreate settings)
Create repository.boolean
exists(Coordinates coords)
Check if a repository exists on Github.Repo
get(Coordinates coords)
Get repository by name.Github
github()
Get its owner.Iterable<Repo>
iterate(String identifier)
Iterate all public repos, starting with the one you've seen already.void
remove(Coordinates coords)
Remove repository by name.
-
-
-
Method Detail
-
github
Github github()
Get its owner.- Returns:
- Github
-
create
Repo create(Repos.RepoCreate settings) throws IOException
Create repository.- Parameters:
settings
- Settings to use for creating the new repository- Returns:
- Repository
- Throws:
IOException
- If there is any I/O problem- Since:
- 0.5
- See Also:
- Create Repository
-
get
Repo get(Coordinates coords)
Get repository by name.- Parameters:
coords
- Repository name in "user/repo" format- Returns:
- Repository
- See Also:
- Get Repository
-
remove
void remove(Coordinates coords) throws IOException
Remove repository by name.Note: Deleting a repository requires admin access. If OAuth is used, the delete_repo scope is required.
- Parameters:
coords
- Repository name in "user/repo" format- Throws:
IOException
- If there is any I/O problem- See Also:
- Delete a Repository
-
iterate
Iterable<Repo> iterate(String identifier)
Iterate all public repos, starting with the one you've seen already.- Parameters:
identifier
- The integer ID of the last Repo that you’ve seen.- Returns:
- Iterator of repo
- See Also:
- List all public repositories
-
exists
boolean exists(Coordinates coords) throws IOException
Check if a repository exists on Github.- Parameters:
coords
- Coordinates of the repo.- Returns:
- True if it exists, false otherwise.
- Throws:
IOException
- If something goes wrong.
-
-