diff options
-rw-r--r-- | app/src/main/java/ml/docilealligator/infinityforreddit/activities/WikiActivity.java | 1 | ||||
-rw-r--r-- | app/src/main/java/ml/docilealligator/infinityforreddit/apis/RedditAPI.java | 8 |
2 files changed, 7 insertions, 2 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/WikiActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/WikiActivity.java index f4cc17fa..b6fc29af 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/WikiActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/WikiActivity.java @@ -71,6 +71,7 @@ import retrofit2.Retrofit; public class WikiActivity extends BaseActivity { public static final String EXTRA_SUBREDDIT_NAME = "ESN"; + public static final String WIKI_PATH = "WP"; private static final String WIKI_MARKDOWN_STATE = "WMS"; @BindView(R.id.coordinator_layout_comment_wiki_activity) diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/apis/RedditAPI.java b/app/src/main/java/ml/docilealligator/infinityforreddit/apis/RedditAPI.java index 91b96c70..a7c67893 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/apis/RedditAPI.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/apis/RedditAPI.java @@ -294,8 +294,12 @@ public interface RedditAPI { @GET("/api/trending_searches_v1.json?withAds=0&raw_json=1&gilding_detail=1") Call<String> getTrendingSearches(@HeaderMap Map<String, String> headers); - @GET("/r/{subredditName}/wiki/index.json?raw_json=1") - Call<String> getWiki(@Path("subredditName") String subredditName); + default Call<String> getWiki(@Path("subredditName") String subredditName) { + return getWikiPage(subredditName, "index"); + }; + + @GET("/r/{subredditName}/wiki/{wikiPage}.json?raw_json=1") + Call<String> getWikiPage(@Path("subredditName") String subredditName, @Path("wikiPage") String wikiPage); @GET("{sortType}?raw_json=1") ListenableFuture<Response<String>> getBestPostsListenableFuture(@Path("sortType") String sortType, @Query("after") String lastItem, @HeaderMap Map<String, String> headers); |