Browse files

Rename parameters to be consistent with Weibo API

  • Loading branch information...
1 parent 1926d35 commit 0898487e7862b7d4fcad0c6e2a32860a06a77ea9 @vergnesOL vergnesOL committed Mar 16, 2012
View
4 src/main/java/org/springframework/social/weibo/api/FavoriteOperations.java
@@ -23,9 +23,9 @@
Favorite createFavorite(long statusId);
- Favorite deleteFavorite(long statusId);
+ Favorite deleteFavorite(long id);
- boolean deleteFavorites(List<Long> statusIds);
+ boolean deleteFavorites(List<Long> ids);
Favorite getFavorite(long id);
View
8 src/main/java/org/springframework/social/weibo/api/impl/FavoriteTemplate.java
@@ -47,21 +47,21 @@ public Favorite createFavorite(long statusId) {
}
@Override
- public Favorite deleteFavorite(long statusId) {
+ public Favorite deleteFavorite(long id) {
requireAuthorization();
MultiValueMap<String, String> request = new LinkedMultiValueMap<String, String>(
1);
- request.add("id", String.valueOf(statusId));
+ request.add("id", String.valueOf(id));
return restTemplate.postForObject(buildUri("favorites/destroy.json"),
request, Favorite.class);
}
@Override
- public boolean deleteFavorites(List<Long> statusId) {
+ public boolean deleteFavorites(List<Long> ids) {
requireAuthorization();
MultiValueMap<String, String> request = new LinkedMultiValueMap<String, String>(
1);
- request.add("ids", StringUtils.join(statusId));
+ request.add("ids", StringUtils.join(ids));
JsonNode jsonNode = restTemplate.postForObject(
buildUri("favorites/destroy_batch.json"), request,
JsonNode.class);

0 comments on commit 0898487

Please sign in to comment.