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
a7a37e3
commit a0cd46b
Showing
13 changed files
with
154 additions
and
44 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,5 @@ | |
.DS_Store | ||
/build | ||
/captures | ||
/node_modules | ||
/node_modules | ||
/projectFilesBackup1 |
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 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 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,19 +1,19 @@ | ||
package com.wkw.hot.data.api; | ||
|
||
import com.wkw.common_lib.rx.ApiResponse; | ||
import com.wkw.hot.entity.PopularEntity; | ||
|
||
import java.util.List; | ||
|
||
import com.wkw.hot.entity.PagePopularEntity; | ||
import retrofit2.http.GET; | ||
import retrofit2.http.Query; | ||
import rx.Observable; | ||
|
||
/** | ||
* Created by wukewei on 16/5/26. | ||
*/ | ||
public interface HotApi { | ||
|
||
@GET("txapi/weixin/wxhot") | ||
rx.Observable<ApiResponse<List<PopularEntity>>> getPopular(@Query("page") int page, @Query("num") int num, @Query("word") String word); | ||
@GET("582-2") | ||
Observable<ApiResponse<PagePopularEntity>> getPopular(@Query("page") int page, @Query("key") String word, | ||
@Query("showapi_appid") String showapi_appid, | ||
@Query("showapi_sign") String showapi_sign); | ||
|
||
} |
101 changes: 101 additions & 0 deletions
101
app/src/main/java/com/wkw/hot/entity/PagePopularEntity.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,101 @@ | ||
package com.wkw.hot.entity; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
import java.util.List; | ||
|
||
/** | ||
* Created by wukewei on 17/5/8. | ||
* Email zjwkw1992@163.com | ||
* GitHub https://github.com/zj-wukewei | ||
*/ | ||
|
||
public class PagePopularEntity { | ||
@SerializedName("ret_code") | ||
private int retCode; | ||
@SerializedName("pagebean") | ||
private Pagebean pagebean; | ||
|
||
|
||
public int getRetCode() { | ||
return retCode; | ||
} | ||
|
||
|
||
public void setRetCode(int retCode) { | ||
this.retCode = retCode; | ||
} | ||
|
||
|
||
public Pagebean getPagebean() { | ||
return pagebean; | ||
} | ||
|
||
|
||
public void setPagebean(Pagebean pagebean) { | ||
this.pagebean = pagebean; | ||
} | ||
|
||
|
||
public static class Pagebean { | ||
@SerializedName("allPages") | ||
private int allPages; | ||
@SerializedName("contentlist") | ||
private List<PopularEntity> contentlist; | ||
@SerializedName("currentPage") | ||
private int currentPage; | ||
@SerializedName("allNum") | ||
private int allNum; | ||
@SerializedName("maxResult") | ||
private int maxResult; | ||
|
||
|
||
public int getMaxResult() { | ||
return maxResult; | ||
} | ||
|
||
|
||
public void setMaxResult(int maxResult) { | ||
this.maxResult = maxResult; | ||
} | ||
|
||
|
||
public int getAllPages() { | ||
return allPages; | ||
} | ||
|
||
|
||
public void setAllPages(int allPages) { | ||
this.allPages = allPages; | ||
} | ||
|
||
|
||
public List<PopularEntity> getContentlist() { | ||
return contentlist; | ||
} | ||
|
||
|
||
public void setContentlist(List<PopularEntity> contentlist) { | ||
this.contentlist = contentlist; | ||
} | ||
|
||
|
||
public int getCurrentPage() { | ||
return currentPage; | ||
} | ||
|
||
|
||
public void setCurrentPage(int currentPage) { | ||
this.currentPage = currentPage; | ||
} | ||
|
||
|
||
public int getAllNum() { | ||
return allNum; | ||
} | ||
|
||
|
||
public void setAllNum(int allNum) { | ||
this.allNum = allNum; | ||
} | ||
} | ||
} |
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 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 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