mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Work around API change that throws out hidden stories and vends blank pages. (#664)
This commit is contained in:
parent
3e8a7ec256
commit
d29e168ccd
2 changed files with 6 additions and 0 deletions
|
@ -78,11 +78,13 @@ public class APIConstants {
|
|||
public static final String PARAMETER_READ_FILTER = "read_filter";
|
||||
public static final String PARAMETER_INCLUDE_TIMESTAMPS = "include_timestamps";
|
||||
public static final String PARAMETER_GLOBAL_FEED = "global_feed";
|
||||
public static final String PARAMETER_INCLUDE_HIDDEN = "include_hidden";
|
||||
|
||||
public static final String VALUE_PREFIX_SOCIAL = "social:";
|
||||
public static final String VALUE_ALLSOCIAL = "river:blurblogs"; // the magic value passed to the mark-read API for all social feeds
|
||||
public static final String VALUE_OLDER = "older";
|
||||
public static final String VALUE_NEWER = "newer";
|
||||
public static final String VALUE_TRUE = "true";
|
||||
|
||||
public static final String URL_CONNECT_FACEBOOK = NEWSBLUR_URL + "/oauth/facebook_connect/";
|
||||
public static final String URL_CONNECT_TWITTER = NEWSBLUR_URL + "/oauth/twitter_connect/";
|
||||
|
|
|
@ -266,6 +266,7 @@ public class APIManager {
|
|||
for (String hash : storyHashes) {
|
||||
values.put(APIConstants.PARAMETER_H, hash);
|
||||
}
|
||||
values.put(APIConstants.PARAMETER_INCLUDE_HIDDEN, APIConstants.VALUE_TRUE);
|
||||
APIResponse response = get(APIConstants.URL_RIVER_STORIES, values);
|
||||
return (StoriesResponse) response.getResponse(gson, StoriesResponse.class);
|
||||
}
|
||||
|
@ -282,9 +283,11 @@ public class APIManager {
|
|||
if (fs.getSingleFeed() != null) {
|
||||
uri = Uri.parse(APIConstants.URL_FEED_STORIES).buildUpon().appendPath(fs.getSingleFeed()).build();
|
||||
values.put(APIConstants.PARAMETER_FEEDS, fs.getSingleFeed());
|
||||
values.put(APIConstants.PARAMETER_INCLUDE_HIDDEN, APIConstants.VALUE_TRUE);
|
||||
} else if (fs.getMultipleFeeds() != null) {
|
||||
uri = Uri.parse(APIConstants.URL_RIVER_STORIES);
|
||||
for (String feedId : fs.getMultipleFeeds()) values.put(APIConstants.PARAMETER_FEEDS, feedId);
|
||||
values.put(APIConstants.PARAMETER_INCLUDE_HIDDEN, APIConstants.VALUE_TRUE);
|
||||
} else if (fs.getSingleSocialFeed() != null) {
|
||||
String feedId = fs.getSingleSocialFeed().getKey();
|
||||
String username = fs.getSingleSocialFeed().getValue();
|
||||
|
@ -298,6 +301,7 @@ public class APIManager {
|
|||
}
|
||||
} else if (fs.isAllNormal()) {
|
||||
uri = Uri.parse(APIConstants.URL_RIVER_STORIES);
|
||||
values.put(APIConstants.PARAMETER_INCLUDE_HIDDEN, APIConstants.VALUE_TRUE);
|
||||
} else if (fs.isAllSocial()) {
|
||||
uri = Uri.parse(APIConstants.URL_SHARED_RIVER_STORIES);
|
||||
} else if (fs.isAllSaved()) {
|
||||
|
|
Loading…
Add table
Reference in a new issue