combine commits

* add Explore Function
* define API
* Add Fragment + Code + String
* add to main activity (by @mmarif)
This commit is contained in:
6543
2019-10-05 01:10:40 +02:00
parent 9cab502e84
commit 2fe175223c
7 changed files with 355 additions and 1 deletions

View File

@@ -213,6 +213,9 @@ public interface ApiInterface {
@GET("repos/{owner}/{repo}/subscribers") // get all repo watchers
Call<List<UserInfo>> getRepoWatchers(@Header("Authorization") String token, @Path("owner") String ownerName, @Path("repo") String repoName);
@GET("repos/search") // get all repos who match query string
Call<List<UserRepositories>> queryRepos(@Header("Authorization") String token, @Query("q") String searchKeyword, @Query("limit") int limit, @Query("mode") String mode, @Query("sort") String sort, @Query("order") String order);
@POST("repos/{owner}/{repo}/contents/{file}") // create new file
Call<JsonElement> createNewFile(@Header("Authorization") String token, @Path("owner") String ownerName, @Path("repo") String repoName, @Path("file") String fileName, @Body NewFile jsonStr);
@@ -224,4 +227,4 @@ public interface ApiInterface {
@GET("repos/{owner}/{repo}/contents/{fileDir}") // get all the sub files and dirs of a repository
Call<List<Files>> getDirFiles(@Header("Authorization") String token, @Path("owner") String ownerName, @Path("repo") String repoName, @Path("fileDir") String fileDir);
}
}