Remove unused code related to categories

This commit is contained in:
Mark Anderson 2015-03-27 22:39:46 +00:00
parent 902b98b920
commit 9bff3b513b
4 changed files with 0 additions and 54 deletions

View file

@ -1,13 +0,0 @@
package com.newsblur.domain;
import com.google.gson.annotations.SerializedName;
public class Category {
public String title;
public String description;
@SerializedName("feed_ids")
public String[] feedIds;
}

View file

@ -4,9 +4,6 @@ public class APIConstants {
public static final String NEWSBLUR_URL = "https://www.newsblur.com";
public static final String COOKIE_DOMAIN = ".newsblur.com";
public static final String URL_CATEGORIES = NEWSBLUR_URL + "/categories/";
public static final String PARAMETER_CATEGORY = "category";
public static final String URL_ADD_CATEGORIES = NEWSBLUR_URL + "/categories/subscribe";
public static final String URL_AUTOFOLLOW_PREF = NEWSBLUR_URL + "/profile/set_preference";
// TODO: make use of trailing slashes on URLs consistent or document why

View file

@ -26,7 +26,6 @@ import com.newsblur.domain.Feed;
import com.newsblur.domain.FeedResult;
import com.newsblur.domain.Story;
import com.newsblur.domain.ValueMultimap;
import com.newsblur.network.domain.CategoriesResponse;
import com.newsblur.network.domain.FeedFolderResponse;
import com.newsblur.network.domain.NewsBlurResponse;
import com.newsblur.network.domain.ProfileResponse;
@ -118,15 +117,6 @@ public class APIManager {
return (!response.isError());
}
public boolean addCategories(ArrayList<String> categories) {
final ValueMultimap values = new ValueMultimap();
for (String category : categories) {
values.put(APIConstants.PARAMETER_CATEGORY, URLEncoder.encode(category));
}
final APIResponse response = post(APIConstants.URL_ADD_CATEGORIES, values);
return (!response.isError());
}
public NewsBlurResponse markFeedsAsRead(FeedSet fs, Long includeOlder, Long includeNewer) {
ValueMultimap values = new ValueMultimap();
@ -209,16 +199,6 @@ public class APIManager {
return response.getResponse(gson, NewsBlurResponse.class);
}
public CategoriesResponse getCategories() {
final APIResponse response = get(APIConstants.URL_CATEGORIES);
if (!response.isError()) {
CategoriesResponse categoriesResponse = (CategoriesResponse) response.getResponse(gson, CategoriesResponse.class);
return categoriesResponse;
} else {
return null;
}
}
public RegisterResponse signup(final String username, final String password, final String email) {
final ContentValues values = new ContentValues();
values.put(APIConstants.PARAMETER_USERNAME, username);

View file

@ -1,18 +0,0 @@
package com.newsblur.network.domain;
import java.util.HashMap;
import com.google.gson.annotations.SerializedName;
import com.newsblur.domain.Category;
import com.newsblur.domain.Feed;
public class CategoriesResponse extends NewsBlurResponse {
@SerializedName("feeds")
public HashMap<String, Feed> feeds;
@SerializedName("categories")
public Category[] categories;
}