Package com.jcabi.github
Interface Repos
@Immutable
public interface Repos
GitHub Repo API.
- Since:
- 0.5
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classSettings to use when creating a new GitHub repository. -
Method Summary
Modifier and TypeMethodDescriptioncreate(Repos.RepoCreate settings) Create repository.booleanexists(Coordinates coords) Check if a repository exists on GitHub.get(Coordinates coords) Get repository by name.github()Get its owner.Iterate all public repos, starting with the one you've seen already.voidremove(Coordinates coords) Remove repository by name.
-
Method Details
-
github
GitHub github()Get its owner.- Returns:
- GitHub
-
create
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:
-
get
Get repository by name.- Parameters:
coords- Repository name in "user/repo" format- Returns:
- Repository
- See Also:
-
remove
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:
-
iterate
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:
-
exists
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.
-