-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
46a4780
commit d6698bd
Showing
6 changed files
with
257 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
97 changes: 91 additions & 6 deletions
97
...va/eu/bittrade/libs/steemj/plugins/apis/account/history/models/GetAccountHistoryArgs.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,95 @@ | ||
package eu.bittrade.libs.steemj.plugins.apis.account.history.models; | ||
|
||
import org.apache.commons.lang3.builder.ToStringBuilder; | ||
import org.joou.UInteger; | ||
import org.joou.ULong; | ||
|
||
import com.fasterxml.jackson.annotation.JsonCreator; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
import eu.bittrade.libs.steemj.communication.CommunicationHandler; | ||
import eu.bittrade.libs.steemj.plugins.apis.witness.WitnessApi; | ||
import eu.bittrade.libs.steemj.plugins.apis.witness.enums.BandwidthType; | ||
import eu.bittrade.libs.steemj.plugins.apis.witness.models.GetAccountBandwidthArgs; | ||
import eu.bittrade.libs.steemj.protocol.AccountName; | ||
|
||
/** | ||
* This class implements the Steem "get_account_history_args" object. | ||
* | ||
* @author <a href="http://steemit.com/@dez1337">dez1337</a> | ||
*/ | ||
public class GetAccountHistoryArgs { | ||
struct get_account_history_args | ||
{ | ||
steem::protocol::account_name_type account; | ||
uint64_t start = -1; | ||
uint32_t limit = 1000; | ||
}; | ||
@JsonProperty("account") | ||
private AccountName account; | ||
@JsonProperty("start") | ||
private ULong start; | ||
@JsonProperty("limit") | ||
private UInteger limit; | ||
|
||
/** | ||
* Create a new {@link GetAccountBandwidthArgs} instance to be passed to the | ||
* {@link WitnessApi#getAccountBandwidth(CommunicationHandler, GetAccountBandwidthArgs)} | ||
* method. | ||
* | ||
* @param account | ||
* The account name request the bandwidth for. | ||
* @param type | ||
* The {@link BandwidthType} to request. | ||
*/ | ||
@JsonCreator() | ||
public GetAccountHistoryArgs() { | ||
steem::protocol::account_name_type account; | ||
uint64_t start = -1; | ||
uint32_t limit = 1000; | ||
} | ||
|
||
/** | ||
* @return the account | ||
*/ | ||
public AccountName getAccount() { | ||
return account; | ||
} | ||
|
||
/** | ||
* @param account | ||
* the account to set | ||
*/ | ||
public void setAccount(AccountName account) { | ||
this.account = account; | ||
} | ||
|
||
/** | ||
* @return the start | ||
*/ | ||
public ULong getStart() { | ||
return start; | ||
} | ||
|
||
/** | ||
* @param start | ||
* the start to set | ||
*/ | ||
public void setStart(ULong start) { | ||
this.start = start; | ||
} | ||
|
||
/** | ||
* @return the limit | ||
*/ | ||
public UInteger getLimit() { | ||
return limit; | ||
} | ||
|
||
/** | ||
* @param limit | ||
* the limit to set | ||
*/ | ||
public void setLimit(UInteger limit) { | ||
this.limit = limit; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return ToStringBuilder.reflectionToString(this); | ||
} | ||
} |
36 changes: 35 additions & 1 deletion
36
.../eu/bittrade/libs/steemj/plugins/apis/account/history/models/GetAccountHistoryReturn.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,40 @@ | ||
package eu.bittrade.libs.steemj.plugins.apis.account.history.models; | ||
|
||
import java.util.Map; | ||
|
||
import org.apache.commons.lang3.builder.ToStringBuilder; | ||
import org.joou.UInteger; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
import eu.bittrade.libs.steemj.base.models.operations.Operation; | ||
|
||
/** | ||
* This class implements the Steem "get_account_history_return" object. | ||
* | ||
* @author <a href="http://steemit.com/@dez1337">dez1337</a> | ||
*/ | ||
public class GetAccountHistoryReturn { | ||
std::map< uint32_t, api_operation_object > history; | ||
@JsonProperty("history") | ||
private Map<UInteger, Operation> history; | ||
|
||
/** | ||
* This object is only used to wrap the JSON response in a POJO, so | ||
* therefore this class should not be instantiated. | ||
*/ | ||
private GetAccountHistoryReturn() { | ||
} | ||
|
||
/** | ||
* @return the history | ||
*/ | ||
public Map<UInteger, Operation> getHistory() { | ||
return history; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return ToStringBuilder.reflectionToString(this); | ||
} | ||
|
||
} |
72 changes: 70 additions & 2 deletions
72
...n/java/eu/bittrade/libs/steemj/plugins/apis/account/history/models/GetOpsInBlockArgs.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,74 @@ | ||
package eu.bittrade.libs.steemj.plugins.apis.account.history.models; | ||
|
||
import org.apache.commons.lang3.builder.ToStringBuilder; | ||
|
||
import com.fasterxml.jackson.annotation.JsonCreator; | ||
|
||
import eu.bittrade.libs.steemj.communication.CommunicationHandler; | ||
import eu.bittrade.libs.steemj.plugins.apis.witness.WitnessApi; | ||
import eu.bittrade.libs.steemj.plugins.apis.witness.enums.BandwidthType; | ||
import eu.bittrade.libs.steemj.plugins.apis.witness.models.GetAccountBandwidthArgs; | ||
|
||
/** | ||
* This class implements the Steem "get_ops_in_block_args" object. | ||
* | ||
* @author <a href="http://steemit.com/@dez1337">dez1337</a> | ||
*/ | ||
public class GetOpsInBlockArgs { | ||
uint32_t block_num; | ||
bool only_virtual; | ||
@JsonProperty("block_num") | ||
private UInteger blockNum; | ||
@JsonProperty("onlyVirtual") | ||
private Boolean onlyVirtual; | ||
|
||
/** | ||
* Create a new {@link GetAccountBandwidthArgs} instance to be passed to the | ||
* {@link WitnessApi#getAccountBandwidth(CommunicationHandler, GetAccountBandwidthArgs)} | ||
* method. | ||
* | ||
* @param account | ||
* The account name request the bandwidth for. | ||
* @param type | ||
* The {@link BandwidthType} to request. | ||
*/ | ||
@JsonCreator() | ||
public GetOpsInBlockArgs() { | ||
steem::protocol::account_name_type account; | ||
uint64_t start = -1; | ||
uint32_t limit = 1000; | ||
} | ||
|
||
/** | ||
* @return the blockNum | ||
*/ | ||
public UInteger getBlockNum() { | ||
return blockNum; | ||
} | ||
|
||
/** | ||
* @param blockNum | ||
* the blockNum to set | ||
*/ | ||
public void setBlockNum(UInteger blockNum) { | ||
this.blockNum = blockNum; | ||
} | ||
|
||
/** | ||
* @return the onlyVirtual | ||
*/ | ||
public Boolean getOnlyVirtual() { | ||
return onlyVirtual; | ||
} | ||
|
||
/** | ||
* @param onlyVirtual | ||
* the onlyVirtual to set | ||
*/ | ||
public void setOnlyVirtual(Boolean onlyVirtual) { | ||
this.onlyVirtual = onlyVirtual; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return ToStringBuilder.reflectionToString(this); | ||
} | ||
} |
35 changes: 34 additions & 1 deletion
35
...java/eu/bittrade/libs/steemj/plugins/apis/account/history/models/GetOpsInBlockReturn.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,38 @@ | ||
package eu.bittrade.libs.steemj.plugins.apis.account.history.models; | ||
|
||
import java.util.ArrayList; | ||
|
||
import org.apache.commons.lang3.builder.ToStringBuilder; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
import eu.bittrade.libs.steemj.base.models.operations.Operation; | ||
|
||
/** | ||
* This class implements the Steem "get_ops_in_block_return" object. | ||
* | ||
* @author <a href="http://steemit.com/@dez1337">dez1337</a> | ||
*/ | ||
public class GetOpsInBlockReturn { | ||
vector< api_operation_object > ops; | ||
@JsonProperty("ops") | ||
private ArrayList<Operation> operations; | ||
|
||
/** | ||
* This object is only used to wrap the JSON response in a POJO, so | ||
* therefore this class should not be instantiated. | ||
*/ | ||
private GetOpsInBlockReturn() { | ||
} | ||
|
||
/** | ||
* @return the operations | ||
*/ | ||
public ArrayList<Operation> getOperations() { | ||
return operations; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return ToStringBuilder.reflectionToString(this); | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
.../java/eu/bittrade/libs/steemj/plugins/apis/account/history/models/GetTransactionArgs.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,17 @@ | ||
package eu.bittrade.libs.steemj.plugins.apis.account.history.models; | ||
|
||
import org.apache.commons.lang3.builder.ToStringBuilder; | ||
|
||
/** | ||
* This class implements the Steem "get_transaction_args" object. | ||
* | ||
* @author <a href="http://steemit.com/@dez1337">dez1337</a> | ||
*/ | ||
public class GetTransactionArgs { | ||
steem::protocol::transaction_id_type id; | ||
|
||
@Override | ||
public String toString() { | ||
return ToStringBuilder.reflectionToString(this); | ||
} | ||
} |