mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-12-28 11:58:23 +01:00
Added API call for generic wiki page.
Updated old wiki-only call to cascade to new generic.
This commit is contained in:
parent
d6c3bfddd7
commit
5cfe8a6016
@ -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)
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user