@author Quinn
| 8 | * @author Quinn |
| 9 | */ |
| 10 | public interface Github { |
| 11 | |
| 12 | |
| 13 | public void makeAuthRequest(String token); |
| 14 | |
| 15 | public Map<String, String> configreHttpHeader(); |
| 16 | |
| 17 | /** |
| 18 | * If the token has already existed,list all token and find it out,remove it and recreate it. |
| 19 | * |
| 20 | * @return |
| 21 | */ |
| 22 | public String createToken(String username, String password) throws GithubError, AuthError,OverAuthError; |
| 23 | |
| 24 | |
| 25 | /** |
| 26 | * List all token,the "token" attribute is empty. |
| 27 | */ |
| 28 | public String findCertainTokenID(String username, String password) throws GithubError, AuthError; |
| 29 | |
| 30 | |
| 31 | /** |
| 32 | * Remove token |
| 33 | */ |
| 34 | public void removeToken(String username, String password) throws GithubError, AuthError; |
| 35 | |
| 36 | /** |
| 37 | * login |
| 38 | */ |
| 39 | public User authUser(String token) throws GithubError, AuthError; |
| 40 | |
| 41 | public List<User> follwerings(String user, int page) throws GithubError, AuthError; |
| 42 | |
| 43 | public List<User> followers(String user, int page) throws GithubError, AuthError; |
| 44 | |
| 45 | public List<Repository> repo(String user, int page) throws GithubError, AuthError; |
| 46 | |
| 47 | public List<Repository> starred(String user, int page) throws GithubError, AuthError; |
| 48 | |
| 49 | public User user(String user) throws GithubError, AuthError; |
| 50 | |
| 51 | public List<Event> receivedEvent(String user, int page) throws GithubError, AuthError; |
| 52 | |
| 53 | public List<Event> userEvent(String user, int page) throws GithubError, AuthError; |
| 54 | |
| 55 | public List<Event> repoEvent(String user, String repo, int page) throws GithubError, AuthError; |
| 56 | |
| 57 | public boolean hasFollow(String targetUser) throws GithubError, AuthError; |
| 58 | |
| 59 | public boolean follow(String targetUser) throws GithubError, AuthError; |
| 60 | |
| 61 | public boolean unfollow(String targetUser) throws GithubError, AuthError; |
| 62 | |
| 63 | public String readme(String owner, String repo) throws GithubError, AuthError; |
| 64 | |
| 65 | public boolean hasStarRepo(String owner, String repo) throws GithubError, AuthError; |
| 66 | |
| 67 | public boolean starRepo(String owner, String repo) throws GithubError, AuthError; |
no outgoing calls
no test coverage detected