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
    • Method Detail

      • github

        Github github()
        Get its owner.
        Returns:
        Github
      • 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.