create account

Steem Java-API V0.1.0 – Update #4 by dez1337

View this thread on: hive.blogpeakd.comecency.com
· @dez1337 ·
$39.39
Steem Java-API V0.1.0 – Update #4
Hay Steemers,

after nearly two month of silence I was finally able to put some more time in this project and released version 0.1.0 of the Steem Java API Wrapper. #Yeha! 

The first thing I want to do is to say thanks again: According to the number of views on GitHub and the comments I received so far, there seems to be some interest in this project which motivates me a lot – So thanks for that!

Today I want to share some news on the Java-API-Wrapper project with you again. Those of you who don‘t know of the project yet may want to have a look at the repository on GitHub: 

> [https://github.com/marvin-we/steem-java-api-wrapper](https://github.com/marvin-we/steem-java-api-wrapper)

![Icon](https://steemitimages.com/0x0/http://i.imgsafe.org/134554edf1.png)
[Source](https://kemptechnologies.com/blog/wp-content/uploads/2015/07/JAVA-API-Wrapper.png)

# Update V0.1.0
Let's make this post short and start with the important stuff: The changes of this release.

## Unit Tests
I've created some more unit tests to ensure the quality of the project. 

## Executing transactions
I think this is one of the importants features and sadly, it is one of the most complex ones: The support of transactions to perform operations like voting, following, buying or selling steem. This release contains the implementation of @xerocs tutorial about how to perform those transactions, but there is still a long way to go until the API Wrapper is able to send transactions. 

## Deserialzsation of Operations
In older versions of the API Wrapper methods like „getBlock“ or „getAccountHistory“ returned a simple array of objects for the operations field. 

With the new version the API Wrapper is able to return specific objects for each operation. 

### Example:
Old behavior:

```Java
Object[] firstOperation = accountHistory.get(0).getOperations();
if(firstOperation[0].equals(„vote“)) {
// Parse the vote object in firstOperation[1]
}
```

New behavior:
```Java
Operation firstOperation = accountHistory.get(0).getOperations();
if(firstOperation instanceof VoteOperation) {
VoteOperation voteOp = (VoteOperation)  firstOperation;
}
```

## New methods
The following new methods have been implemented
* get_active_witnesses
* get_witnesses_by_vote
* get_witness_by_account
* get_replies_by_last_update

## Bugs and typos
Due to some lack of testing the last release contained some bugs and typos which have been fixed now.

# How to include the Steem Java API Wrapper into your project
The new version has already been pushed into the Maven central repo and can again be added as an depdency in Maven and Gradle.
Once the API is synced to the Maven Central Repository, you can include it like this:
## Maven
```XML
        <dependency>
            <groupId>eu.bittrade.libs</groupId>
            <artifactId>steem-api-wrapper</artifactId>
            <version>0.1.0</version>
        </dependency>
```

## Gradle
```XML
dependencies {
    compile 'eu.bittrade.libs:steem-api-wrapper:0.0.3'
}
````

# How to support the project
If you want to support this project you can do it in several ways.
1. Use the Java API Wrapper for your projects and provide feedback.
2. Fork the project and improvde the project. Even if you are now Java developer at all, you could help by improving the JavaDoc.
3. Tell more people about this project

Here is a list of people that already suported the project.

## Contributors
* @inertia provided a bunch of unit tests to this project.
* An article from @klye has been used to improve the documentation of the methods.
 * The [guide](https://steemit.com/steem/@xeroc/steem-transaction-signing-in-a-nutshell) from @xeroc shows how to create and sign transactions.
If you have ideas or even better, can write Java code, feel free to become a contributor too :)

<hr>
As you can imagine, there is still a lot of work to do. Make sure to never miss an update again by pressing the button below. 

[![follow me](http://www.vector-eps.com/wp-content/gallery/follow-me-twitter-buttons-and-icons/follow-me-twitter-buttons-and-icons6.jpg)](https://steemit.com/@dez1337) 
[Source](http://www.vector-eps.com/wp-content/gallery/follow-me-twitter-buttons-and-icons/follow-me-twitter-buttons-and-icons6.jpg)

Thanks for reading and best regards!
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 114 others
properties (23)
authordez1337
permlinksteem-java-api-v0-1-0-update-4
categorysteem
json_metadata{"tags":["steem","steemit","java","programming","yeha"],"users":["xerocs","inertia","klye","xeroc"],"image":["https://steemitimages.com/0x0/http://i.imgsafe.org/134554edf1.png","http://www.vector-eps.com/wp-content/gallery/follow-me-twitter-buttons-and-icons/follow-me-twitter-buttons-and-icons6.jpg"],"links":["https://github.com/marvin-we/steem-java-api-wrapper","https://kemptechnologies.com/blog/wp-content/uploads/2015/07/JAVA-API-Wrapper.png","https://steemit.com/steem/@xeroc/steem-transaction-signing-in-a-nutshell","https://steemit.com/@dez1337","http://www.vector-eps.com/wp-content/gallery/follow-me-twitter-buttons-and-icons/follow-me-twitter-buttons-and-icons6.jpg"],"app":"steemit/0.1","format":"markdown"}
created2017-02-26 15:44:27
last_update2017-02-26 15:44:27
depth0
children4
last_payout2017-03-29 23:43:57
cashout_time1969-12-31 23:59:59
total_payout_value31.451 HBD
curator_payout_value7.940 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length4,258
author_reputation20,544,257,521,749
root_title"Steem Java-API V0.1.0 – Update #4"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,598,044
net_rshares79,244,830,910,193
author_curate_reward""
vote details (178)
@bitsnaps ·
Thanks for this work, I would like to see that in groovy language as well, I'll try to post an example, it shouldn't be difficult anyway.
👍  
properties (23)
authorbitsnaps
permlinkre-dez1337-steem-java-api-v0-1-0-update-4-20170424t180914743z
categorysteem
json_metadata{"tags":["steem"],"app":"steemit/0.1"}
created2017-04-24 18:09:15
last_update2017-04-24 18:09:15
depth1
children1
last_payout2017-05-01 18:09:15
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length137
author_reputation12,157,172,802
root_title"Steem Java-API V0.1.0 – Update #4"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id3,103,052
net_rshares10,899,759,889
author_curate_reward""
vote details (1)
@dez1337 ·
Thanks for the feedback.

I dont know how usable it would be, but you can add a jar to the groovy classpath and use the methods of that class. If you go for this: There is already a new version (0.2.0) in place that you might want to check out. And please provide some feedback :)
properties (22)
authordez1337
permlinkre-bitsnaps-re-dez1337-steem-java-api-v0-1-0-update-4-20170424t205106857z
categorysteem
json_metadata{"tags":["steem"],"app":"steemit/0.1"}
created2017-04-24 20:51:06
last_update2017-04-24 20:51:06
depth2
children0
last_payout2017-05-01 20:51:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length280
author_reputation20,544,257,521,749
root_title"Steem Java-API V0.1.0 – Update #4"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id3,104,529
net_rshares0
@transisto ·
I'm trying to kickstart the use of the #steemdev tag. Your post would fit well in that category.
👍  
properties (23)
authortransisto
permlinkre-dez1337-steem-java-api-v0-1-0-update-4-20170227t060441521z
categorysteem
json_metadata{"tags":["steemdev","steem"],"app":"steemit/0.1"}
created2017-02-27 06:04:39
last_update2017-02-27 06:04:39
depth1
children1
last_payout2017-03-29 23:43:57
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length96
author_reputation330,357,940,720,833
root_title"Steem Java-API V0.1.0 – Update #4"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,602,968
net_rshares9,076,988,338
author_curate_reward""
vote details (1)
@dez1337 ·
$0.45
Good idea, I will keep that in mind for further updates :)
👍  
properties (23)
authordez1337
permlinkre-transisto-re-dez1337-steem-java-api-v0-1-0-update-4-20170227t065956690z
categorysteem
json_metadata{"tags":["steem"],"app":"steemit/0.1"}
created2017-02-27 07:00:03
last_update2017-02-27 07:00:03
depth2
children0
last_payout2017-03-29 23:43:57
cashout_time1969-12-31 23:59:59
total_payout_value0.447 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length58
author_reputation20,544,257,521,749
root_title"Steem Java-API V0.1.0 – Update #4"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,603,197
net_rshares985,607,553,322
author_curate_reward""
vote details (1)