Skip to content

Commit

Permalink
update getFollowers method to work with new steem api #180
Browse files Browse the repository at this point in the history
  • Loading branch information
starfish89 committed Jan 3, 2018
1 parent 4a0b7f4 commit aeead1b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
public class GetOpsInBlockArgs {
@JsonProperty("block_num")
private UInteger blockNum;
@JsonProperty("onlyVirtual")
@JsonProperty("only_virtual")
private boolean onlyVirtual;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import eu.bittrade.libs.steemj.plugins.apis.follow.models.FeedEntry;
import eu.bittrade.libs.steemj.plugins.apis.follow.models.FollowApiObject;
import eu.bittrade.libs.steemj.plugins.apis.follow.models.FollowCountApiObject;
import eu.bittrade.libs.steemj.plugins.apis.follow.models.GetFollowersReturn;
import eu.bittrade.libs.steemj.plugins.apis.follow.models.PostsPerAuthorPair;
import eu.bittrade.libs.steemj.protocol.AccountName;

Expand Down Expand Up @@ -65,17 +66,14 @@ private FollowApi() {
* </ul>
* @throws SteemResponseException
*/
public static List<FollowApiObject> getFollowers(CommunicationHandler communicationHandler, AccountName following,
AccountName startFollower, FollowType type, short limit)
public static GetFollowersReturn getFollowers(CommunicationHandler communicationHandler, GetFollowerArgs getFollowersArgs)
throws SteemCommunicationException, SteemResponseException {
JsonRPCRequest requestObject = new JsonRPCRequest();
requestObject.setApiMethod(RequestMethods.GET_FOLLOWERS);
requestObject.setSteemApi(SteemApiType.FOLLOW_API);
requestObject.setAdditionalParameters(getFollowersArgs);

Object[] parameters = { following.getName(), startFollower.getName(), type.toString().toLowerCase(), limit };
requestObject.setAdditionalParameters(parameters);

return communicationHandler.performRequest(requestObject, FollowApiObject.class);
return communicationHandler.performRequest(requestObject, GetFollowersReturn.class).get(0);
}

/**
Expand Down

0 comments on commit aeead1b

Please sign in to comment.