create account

SteemJ Dev Diary #7 (07.01.2018) - Finalize the DatabaseApi by dez1337

View this thread on: hive.blogpeakd.comecency.com
· @dez1337 · (edited)
$80.08
SteemJ Dev Diary #7 (07.01.2018) - Finalize the DatabaseApi
*The last planned day of the SteemJ Dev Diary was used to add the remaining 74 objects to the DatabaseApi.*

<center>
![SteemJV2Logo](https://imgur.com/NGivnNo.png)
</center>

<center>
Latest SteemJ 0.4.x releases: [0.4.3](https://steemit.com/utopian-io/@dez1337/steemj-v0-4-3-is-available-now-use-the-steem-api-in-your-java-project) [v0.4.2](https://steemit.com/utopian-io/@dez1337/steemj-v0-4-2-is-available-now-use-the-steem-api-in-your-java-project) [v0.4.2pr1](https://steemit.com/steemdev/@dez1337/steemj-v0-4-1-has-been-released-use-the-steem-api-in-your-java-project) [v0.4.1](https://steemit.com/steemdev/@dez1337/steemj-v0-4-1-has-been-released-use-the-steem-api-in-your-java-project) [v0.4.0](https://steemit.com/steemdev/@dez1337/steemj-v0-4-0-has-been-released-integrate-steem-into-your-java-project) 
</center>

# SteemJ Dev Diary #7 (07.01.2018) - Finalize the DatabaseApi
<br>Hello Steemians and welcome back to day #5 of the SteemJ HF 0.20 Dev Diary! 

This series has been introduced to collect feedback from you and to motivate myself to finalize the next SteemJ version as soon as possible. If this is the first part of this series you read, you may want to checkout [Day #1](https://steemit.com/utopian-io/@dez1337/steemj-dev-diary-1-01-01-2018-cryptocore-and-code-cleanups) which explains the motivation behind this diary in detail and also provides a first overview of the API changes that come with HF 0.20.

# Changes during day #7
We made it - 7 days fully focused on SteemJ. Thanks to everyone who showed her/his interest and for your support in general. There is still a lot to do, but I guess this diary was really needed to get a good starting point for HF 0.20. related changes.

I also have to say that this series was quite exhausting, because 90% of the work had to follow three steps:
1. Check and analyze the Steem source code 
2. Compare it against the current SteemJ implementation
3. Refactor, adjust and complement the existing code

To give you an idea about the work done in total: 
* About ~100 files have been added 
* 553 Files have been changed
* About 18.000 lines have been added 
* And about 4.000 have been removed.

<center>
![ListOfFiles](https://imgur.com/jqJQoYL.png)
</center>

The work today was focused on the DatabaseApi again. As promised I've added all remaining objects and methods so that the 'DatabaseApi' is more or less ready to be tested and documented. The Screenshot below shows all methods that will be available.

<center>
![ListOfDatabaseApi](https://imgur.com/uhlaCxh.png)
</center>

Full list of commits:
* [0a3555](https://github.com/marvin-we/steem-java-api-wrapper/commit/0a35550078cc8aa6f504e671329baea80a8728f9)

*(A prove that the commits have been made by me can [be found here](https://steemit.com/utopian-io/@dez1337/steemj-image-upload-1-0-0-has-been-released-upload-images-to-steemitimages-com-out-of-your-java-application#@dez1337/re-codingdefined-re-dez1337-steemj-image-upload-1-0-0-has-been-released-upload-images-to-steemitimages-com-out-of-your-java-application-20171217t115152531z))*

A list of all commits made after the last release can be found here: [https://github.com/marvin-we/steem-java-api-wrapper/compare/v0.4.3...master](https://github.com/marvin-we/steem-java-api-wrapper/compare/v0.4.3...master)

# General information
## What is SteemJ?
SteemJ is a project that allows you to communicate with a Steem node using Java. So far, the project supports most of the API calls and is also able to broadcast most of the common operation types. Further information can be found on [GitHub](https://github.com/marvin-we/steem-java-api-wrapper).

> https://github.com/marvin-we/steem-java-api-wrapper

## Quick Start Guide

### Add SteemJ to your project
SteemJ binaries are pushed into the maven central repository and can be integrated with a bunch of build management tools like Maven. The [Wiki](https://github.com/marvin-we/steem-java-api-wrapper/wiki/How-to-add-SteemJ-to-your-project) provides a lot of examples for the most common build tools. If you do not use a build management tool you can download the binaries as described [here](https://github.com/marvin-we/steem-java-api-wrapper/wiki/How-to-add-SteemJ-to-your-project#download).

To add this release to your project paste the following snippet into your 'pom.xml'

```XML
<dependency>
    <groupId>eu.bittrade.libs</groupId>
    <artifactId>steemj-core</artifactId>
    <version>0.4.3</version>
</dependency>
```

### Start posting

```Java
SteemJConfig myConfig = SteemJConfig.getInstance();

myConfig.setDefaultAccount(new AccountName("YOUR-ACCOUNT"));

List<ImmutablePair<PrivateKeyType, String>> privateKeys = new ArrayList<>();
privateKeys.add(new ImmutablePair<>(PrivateKeyType.POSTING, "YOUR-PRIVATE-POSTING-KEY"));

myConfig.getPrivateKeyStorage().addAccount(myConfig.getDefaultAccount(), privateKeys);

steemJ.createComment(new AccountName("steemj"), new Permlink("testofsteemj040"), "Example comment without no link but with a @user .", new String[] { "test" });

```

### Further information
The [sample module](https://github.com/marvin-we/steem-java-api-wrapper/tree/master/sample) of the SteemJ project provides showcases for the most common acitivies and operations users want to perform. 

Beside that you can find a lot of snippets and examples in the different [Wiki sections](https://github.com/marvin-we/steem-java-api-wrapper/wiki).  

## Contribute
The project became quite big and there is still a lot to do. If you want to support the project simply clone the git repository and submit a pull request. I would really appreciate it =).

> git clone https://github.com/marvin-we/steem-java-api-wrapper.git

## Get in touch!
Most of my projects are pretty time consuming and I always try to provide some useful stuff to the community. What keeps me going for that is your feedback and your support. For that reason I would love to get some Feedback from you <3. Just contact me here on [Steemit](https://steemit.com/@dez1337) or ping me on [GitHub](https://github.com/marvin-we/steem-java-api-wrapper).

<br /><hr/><em>Posted on <a href="https://utopian.io/utopian-io/@dez1337/steemj-dev-diary-7-07-01-2018-finalize-the-databaseapi">Utopian.io -  Rewarding Open Source Contributors</a></em><hr/>
👍  , , , , , , , , , , , , , , , , , , ,
properties (23)
authordez1337
permlinksteemj-dev-diary-7-07-01-2018-finalize-the-databaseapi
categoryutopian-io
json_metadata{"community":"utopian","app":"utopian/1.0.0","format":"markdown","repository":{"id":77389964,"name":"steem-java-api-wrapper","full_name":"marvin-we/steem-java-api-wrapper","html_url":"https://github.com/marvin-we/steem-java-api-wrapper","fork":false,"owner":{"login":"marvin-we"}},"pullRequests":[],"platform":"github","type":"development","tags":["utopian-io","steemdev","programming","java","steem"],"users":["dez1337","user"],"links":["https://imgur.com/NGivnNo.png","https://steemit.com/utopian-io/@dez1337/steemj-v0-4-3-is-available-now-use-the-steem-api-in-your-java-project","https://steemit.com/utopian-io/@dez1337/steemj-v0-4-2-is-available-now-use-the-steem-api-in-your-java-project","https://steemit.com/steemdev/@dez1337/steemj-v0-4-1-has-been-released-use-the-steem-api-in-your-java-project","https://steemit.com/steemdev/@dez1337/steemj-v0-4-0-has-been-released-integrate-steem-into-your-java-project","https://steemit.com/utopian-io/@dez1337/steemj-dev-diary-1-01-01-2018-cryptocore-and-code-cleanups","https://imgur.com/jqJQoYL.png","https://imgur.com/uhlaCxh.png","https://github.com/marvin-we/steem-java-api-wrapper/commit/0a35550078cc8aa6f504e671329baea80a8728f9","https://steemit.com/utopian-io/@dez1337/steemj-image-upload-1-0-0-has-been-released-upload-images-to-steemitimages-com-out-of-your-java-application#@dez1337/re-codingdefined-re-dez1337-steemj-image-upload-1-0-0-has-been-released-upload-images-to-steemitimages-com-out-of-your-java-application-20171217t115152531z","https://github.com/marvin-we/steem-java-api-wrapper/compare/v0.4.3...master","https://github.com/marvin-we/steem-java-api-wrapper","https://github.com/marvin-we/steem-java-api-wrapper/wiki/How-to-add-SteemJ-to-your-project","https://github.com/marvin-we/steem-java-api-wrapper/wiki/How-to-add-SteemJ-to-your-project#download","https://github.com/marvin-we/steem-java-api-wrapper/tree/master/sample","https://github.com/marvin-we/steem-java-api-wrapper/wiki","https://steemit.com/@dez1337"],"image":["https://imgur.com/NGivnNo.png","https://imgur.com/jqJQoYL.png","https://imgur.com/uhlaCxh.png"],"moderator":{"account":"dutch","reviewed":true,"pending":false,"flagged":false}}
created2018-01-07 21:52:12
last_update2018-01-09 17:14:36
depth0
children11
last_payout2018-01-14 21:52:12
cashout_time1969-12-31 23:59:59
total_payout_value57.518 HBD
curator_payout_value22.565 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length6,276
author_reputation20,544,257,521,749
root_title"SteemJ Dev Diary #7 (07.01.2018) - Finalize the DatabaseApi"
beneficiaries
0.
accountutopian.pay
weight2,500
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id27,851,550
net_rshares9,485,280,277,747
author_curate_reward""
vote details (20)
@bitsnaps ·
Finally, I can see someone use Eclipse in prod, that's great :)
properties (22)
authorbitsnaps
permlinkre-dez1337-steemj-dev-diary-7-07-01-2018-finalize-the-databaseapi-20180223t214018600z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"community":"busy","app":"busy/2.3.0"}
created2018-02-23 21:40:24
last_update2018-02-23 21:40:24
depth1
children0
last_payout2018-03-02 21:40:24
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_length63
author_reputation12,157,172,802
root_title"SteemJ Dev Diary #7 (07.01.2018) - Finalize the DatabaseApi"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id39,962,193
net_rshares0
@dutch ·
$0.13
Thank you for the contribution. It has been approved.

A damn shame that this brings your series to an end. Your work was interesting to follow and set an example for the quantity and quality of contributions we like to see.

Have you given much thought to future development series?

You can contact us on [Discord](https://discord.gg/UCvqCsx).
**[[utopian-moderator]](https://utopian.io/moderators)**
👍  
properties (23)
authordutch
permlinkre-dez1337-steemj-dev-diary-7-07-01-2018-finalize-the-databaseapi-20180109t142302201z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"community":"utopian","app":"utopian/1.0.0"}
created2018-01-09 14:23:03
last_update2018-01-09 14:23:03
depth1
children1
last_payout2018-01-16 14:23:03
cashout_time1969-12-31 23:59:59
total_payout_value0.098 HBD
curator_payout_value0.029 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length402
author_reputation11,905,004,165,125
root_title"SteemJ Dev Diary #7 (07.01.2018) - Finalize the DatabaseApi"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id28,263,290
net_rshares11,781,533,525
author_curate_reward""
vote details (1)
@dez1337 · (edited)
$0.75
Thank you for the quick review @dutch =)

> Have you given much thought to future development series?

There is still a lot of work to do to be ready for HF 0.20 - I may start the next one next week, but right now I need to do a break or my girlfriend will kill me :D
👍  
properties (23)
authordez1337
permlinkre-dutch-re-dez1337-steemj-dev-diary-7-07-01-2018-finalize-the-databaseapi-20180109t211532716z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"users":["dutch"],"app":"steemit/0.1"}
created2018-01-09 21:15:30
last_update2018-01-09 21:16:30
depth2
children0
last_payout2018-01-16 21:15:30
cashout_time1969-12-31 23:59:59
total_payout_value0.568 HBD
curator_payout_value0.183 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length267
author_reputation20,544,257,521,749
root_title"SteemJ Dev Diary #7 (07.01.2018) - Finalize the DatabaseApi"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id28,339,309
net_rshares69,882,179,793
author_curate_reward""
vote details (1)
@eastmael ·
$0.12
Hi, I checked the project in github and tried to join the discord server but the invitation link's expired. Can you create a new invite that's set to **never expires**? thanks.
👍  
properties (23)
authoreastmael
permlinkre-dez1337-steemj-dev-diary-7-07-01-2018-finalize-the-databaseapi-20180108t015052797z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2018-01-08 01:51:00
last_update2018-01-08 01:51:00
depth1
children4
last_payout2018-01-15 01:51:00
cashout_time1969-12-31 23:59:59
total_payout_value0.096 HBD
curator_payout_value0.028 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length176
author_reputation78,967,407,130,763
root_title"SteemJ Dev Diary #7 (07.01.2018) - Finalize the DatabaseApi"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id27,888,532
net_rshares12,114,839,454
author_curate_reward""
vote details (1)
@dez1337 ·
$1.08
Hay @eastmael ,

thank you for the hint - Here is a new invite: https://discord.gg/9jZQHv 

I also updated the readme =) 

Best regards!
👍  ,
properties (23)
authordez1337
permlinkre-eastmael-re-dez1337-steemj-dev-diary-7-07-01-2018-finalize-the-databaseapi-20180108t210610420z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"users":["eastmael"],"links":["https://discord.gg/9jZQHv"],"app":"steemit/0.1"}
created2018-01-08 21:06:09
last_update2018-01-08 21:06:09
depth2
children3
last_payout2018-01-15 21:06:09
cashout_time1969-12-31 23:59:59
total_payout_value0.840 HBD
curator_payout_value0.243 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length136
author_reputation20,544,257,521,749
root_title"SteemJ Dev Diary #7 (07.01.2018) - Finalize the DatabaseApi"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id28,086,488
net_rshares100,694,761,780
author_curate_reward""
vote details (2)
@eastmael ·
$0.12
Thanks. It's in SteemDev (^ ^). Thought it was a different server. XD
👍  
properties (23)
authoreastmael
permlinkre-dez1337-re-eastmael-re-dez1337-steemj-dev-diary-7-07-01-2018-finalize-the-databaseapi-20180108t213006019z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2018-01-08 21:30:03
last_update2018-01-08 21:30:03
depth3
children2
last_payout2018-01-15 21:30:03
cashout_time1969-12-31 23:59:59
total_payout_value0.092 HBD
curator_payout_value0.029 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length69
author_reputation78,967,407,130,763
root_title"SteemJ Dev Diary #7 (07.01.2018) - Finalize the DatabaseApi"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id28,090,690
net_rshares11,781,533,525
author_curate_reward""
vote details (1)
@edgar-trem ·
Hey @dez1337 Check out this [first post](https://steemit.com/mixion/@steem-mixion/this-is-a-first-attempt-to-post-using-mixion-with-a-custom-editor) I created using SteemJ on Android.   
![mixion3.png](https://steemitimages.com/DQmPrqv7uBUX91APo712Jz6CAeoeHzhz1UJotpW4v3Cj3fv/mixion3.png)
properties (22)
authoredgar-trem
permlinkre-dez1337-steemj-dev-diary-7-07-01-2018-finalize-the-databaseapi-20180212t045158312z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"users":["dez1337"],"image":["https://steemitimages.com/DQmPrqv7uBUX91APo712Jz6CAeoeHzhz1UJotpW4v3Cj3fv/mixion3.png"],"links":["https://steemit.com/mixion/@steem-mixion/this-is-a-first-attempt-to-post-using-mixion-with-a-custom-editor"],"app":"steemit/0.1"}
created2018-02-12 04:51:57
last_update2018-02-12 04:51:57
depth1
children0
last_payout2018-02-19 04:51: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_length288
author_reputation4,926,579,982,162
root_title"SteemJ Dev Diary #7 (07.01.2018) - Finalize the DatabaseApi"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id36,839,466
net_rshares0
@jaiverc007 ·
$0.12
I liked your blog
👍  
properties (23)
authorjaiverc007
permlinkre-dez1337-steemj-dev-diary-7-07-01-2018-finalize-the-databaseapi-20180107t223654188z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2018-01-07 22:36:57
last_update2018-01-07 22:36:57
depth1
children0
last_payout2018-01-14 22:36:57
cashout_time1969-12-31 23:59:59
total_payout_value0.094 HBD
curator_payout_value0.028 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length17
author_reputation24,489,273,829
root_title"SteemJ Dev Diary #7 (07.01.2018) - Finalize the DatabaseApi"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id27,858,468
net_rshares12,114,839,454
author_curate_reward""
vote details (1)
@utopian-io ·
### Hey @dez1337 I am @utopian-io. I have just upvoted you!
#### Achievements
- Seems like you contribute quite often. AMAZING!
#### Community-Driven Witness!
I am the first and only Steem Community-Driven Witness. <a href="https://discord.gg/zTrEMqB">Participate on Discord</a>. Lets GROW TOGETHER!
- <a href="https://v2.steemconnect.com/sign/account-witness-vote?witness=utopian-io&approve=1">Vote for my Witness With SteemConnect</a>
- <a href="https://v2.steemconnect.com/sign/account-witness-proxy?proxy=utopian-io&approve=1">Proxy vote to Utopian Witness with SteemConnect</a>
- Or vote/proxy on <a href="https://steemit.com/~witnesses">Steemit Witnesses</a>

[![mooncryption-utopian-witness-gif](https://steemitimages.com/DQmYPUuQRptAqNBCQRwQjKWAqWU3zJkL3RXVUtEKVury8up/mooncryption-s-utopian-io-witness-gif.gif)](https://steemit.com/~witnesses)

**Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x**
properties (22)
authorutopian-io
permlinkre-dez1337-steemj-dev-diary-7-07-01-2018-finalize-the-databaseapi-20180109t232451425z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"community":"utopian","app":"utopian/1.0.0"}
created2018-01-09 23:24:51
last_update2018-01-09 23:24:51
depth1
children0
last_payout2018-01-16 23:24:51
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_length1,005
author_reputation152,955,367,999,756
root_title"SteemJ Dev Diary #7 (07.01.2018) - Finalize the DatabaseApi"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id28,359,578
net_rshares0