-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c7cba68
commit 41c3d7d
Showing
41 changed files
with
447 additions
and
367 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...va/com/maning/gankmm/http/MyCallBack.java → ...ning/gankmm/http/callback/MyCallBack.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package com.maning.gankmm.http; | ||
package com.maning.gankmm.http.callback; | ||
|
||
import java.util.List; | ||
|
||
|
33 changes: 33 additions & 0 deletions
33
app/src/main/java/com/maning/gankmm/http/gank/APIGankService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package com.maning.gankmm.http.gank; | ||
|
||
import com.maning.gankmm.bean.DayEntity; | ||
import com.maning.gankmm.bean.HttpResult; | ||
import com.maning.gankmm.constant.Constants; | ||
|
||
import java.util.List; | ||
|
||
import retrofit2.Call; | ||
import retrofit2.http.GET; | ||
import retrofit2.http.Headers; | ||
import retrofit2.http.Path; | ||
|
||
|
||
/** | ||
* 接口调用的工具类 | ||
*/ | ||
public interface APIGankService { | ||
|
||
//这里填写全部路径就会覆盖掉Build得BaseUrl | ||
@Headers("Cache-Control: public, max-age=3600") | ||
@GET(Constants.URL_HistoryDate) | ||
Call<HttpResult<List<String>>> getGankHistoryDate(); | ||
|
||
//http://gank.io/api/day/2015/08/06 --- 每日数据 | ||
@Headers("Cache-Control: public, max-age=300") | ||
@GET("day/{year}/{month}/{day}") | ||
Call<DayEntity> getOneDayData(@Path("year") String year, | ||
@Path("month") String month, | ||
@Path("day") String day | ||
); | ||
|
||
} |
Oops, something went wrong.