Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
package com.algorand.algosdk.v2.client.algod;

import java.util.List;

import org.apache.commons.lang3.StringUtils;

import com.algorand.algosdk.crypto.Address;
import com.algorand.algosdk.v2.client.common.Client;
import com.algorand.algosdk.v2.client.common.HttpMethod;
Expand Down Expand Up @@ -28,11 +32,17 @@ public AccountInformation(Client client, Address address) {
}

/**
* When set to `all` will exclude asset holdings, application local state, created
* asset parameters, any created application parameters. Defaults to `none`.
* Exclude additional items from the account. Use `all` to exclude asset holdings,
* application local state, created asset parameters, and created application
* parameters. Use `created-apps-params` to exclude only the parameters of created
* applications (returns only application IDs). Use `created-assets-params` to
* exclude only the parameters of created assets (returns only asset IDs). Multiple
* values can be comma-separated (e.g.,
* `created-apps-params,created-assets-params`). Note: `all` and `none` cannot be
* combined with other values. Defaults to `none`.
*/
public AccountInformation exclude(Enums.Exclude exclude) {
addQuery("exclude", String.valueOf(exclude));
public AccountInformation exclude(List<Enums.Exclude> exclude) {
addQuery("exclude", StringUtils.join(exclude, ","));
return this;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
package com.algorand.algosdk.v2.client.model;

import java.util.Objects;

import com.algorand.algosdk.v2.client.common.PathResponse;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
* AccountApplicationResource describes the account's application resource (local
* state and params if the account is the creator) for a specific application ID.
*/
public class AccountApplicationResource extends PathResponse {

/**
* (appl) the application local data stored in this account.
* The raw account uses `AppLocalState` for this type.
*/
@JsonProperty("app-local-state")
public ApplicationLocalState appLocalState;

/**
* Round when the account opted into or created the application.
*/
@JsonProperty("created-at-round")
public Long createdAtRound;

/**
* Whether the application has been deleted.
*/
@JsonProperty("deleted")
public Boolean deleted;

/**
* The application ID.
*/
@JsonProperty("id")
public Long id;

/**
* (appp) parameters of the application created by this account including app
* global data.
* The raw account uses `AppParams` for this type.
* Only present if the account is the creator and `include=params` is specified.
*/
@JsonProperty("params")
public ApplicationParams params;

@Override
public boolean equals(Object o) {

if (this == o) return true;
if (o == null) return false;

AccountApplicationResource other = (AccountApplicationResource) o;
if (!Objects.deepEquals(this.appLocalState, other.appLocalState)) return false;
if (!Objects.deepEquals(this.createdAtRound, other.createdAtRound)) return false;
if (!Objects.deepEquals(this.deleted, other.deleted)) return false;
if (!Objects.deepEquals(this.id, other.id)) return false;
if (!Objects.deepEquals(this.params, other.params)) return false;

return true;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
package com.algorand.algosdk.v2.client.model;

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

import com.algorand.algosdk.v2.client.common.PathResponse;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
* AccountApplicationsInformationResponse contains a list of application resources
* for an account.
*/
public class AccountApplicationsInformationResponse extends PathResponse {

@JsonProperty("application-resources")
public List<AccountApplicationResource> applicationResources = new ArrayList<AccountApplicationResource>();

/**
* Used for pagination, when making another request provide this token with the
* next parameter. The next token is the next application ID to use as the
* pagination cursor.
*/
@JsonProperty("next-token")
public String nextToken;

/**
* The round for which this information is relevant.
*/
@JsonProperty("round")
public Long round;

@Override
public boolean equals(Object o) {

if (this == o) return true;
if (o == null) return false;

AccountApplicationsInformationResponse other = (AccountApplicationsInformationResponse) o;
if (!Objects.deepEquals(this.applicationResources, other.applicationResources)) return false;
if (!Objects.deepEquals(this.nextToken, other.nextToken)) return false;
if (!Objects.deepEquals(this.round, other.round)) return false;

return true;
}
}