Adding a new constructor to the GetFullAccounts API wrapper class

develop
Nelson R. Perez 2018-10-11 19:46:03 -05:00
parent 69e5740d00
commit d75957e5d1
1 changed files with 11 additions and 0 deletions

View File

@ -5,6 +5,7 @@ import java.util.ArrayList;
import java.util.List;
import cy.agorise.graphenej.RPC;
import cy.agorise.graphenej.UserAccount;
import cy.agorise.graphenej.api.ApiAccess;
import cy.agorise.graphenej.models.ApiCall;
@ -18,6 +19,16 @@ public class GetFullAccounts implements ApiCallable {
private List<String> mUserAccounts;
private boolean mSubscribe;
public GetFullAccounts(UserAccount userAccount, boolean subscribe){
this.mUserAccounts = new ArrayList<>();
if(userAccount.getName() != null && !userAccount.getName().equals("")){
this.mUserAccounts.add(userAccount.getName());
}else{
this.mUserAccounts.add(userAccount.getObjectId());
}
this.mSubscribe = subscribe;
}
public GetFullAccounts(List<String> accounts, boolean subscribe){
this.mUserAccounts = accounts;
this.mSubscribe = subscribe;