SteemJ V0.3.3 has been released ~ Use the Steem API in your Java Project

SteemJ v0.3.3 is now able to handle callbacks for new blocks, can be used against the Steem test network and comes with further improvements and bug fixes.


SteemJV2Logo


Previous 0.3.x releases: v0.3.2 v0.3.1 v0.3.0

SteemJ v0.3.3 has been released

Hello Steemians!

I am pleased to announce the next release of SteemJ. This release adds the subscription feature to SteemJ that was already planned for a long time. It can be used to be automatically be informed about new, processed blocks. Beside that @ismelykh pointed out that SteemJ is not able to work against the Test-Network. This is now possible. Beside that, several improvements and bug fixes have been made.

Applied Block Callback

Sadly, using callbacks is a little bit more complicated than just using an Api method. That’s why we start with a first small how to.

A Steem Node provides a feature to notify you about every new block. This Wiki-Page describes how to setup those notifications in SteemJ.

The first thing you need is your own implementation of the BlockAppliedCallback class.

import eu.bittrade.libs.steemj.base.models.SignedBlockHeader;
import eu.bittrade.libs.steemj.communication.BlockAppliedCallback;

public class MyCustomCallback extends BlockAppliedCallback {

    @Override
    public void onNewBlock(SignedBlockHeader signedBlockHeader) {
        System.out.println(signedBlockHeader.toString());
    }

}

As you can see, extending the BlockAppliedCallback class forces you to implement the onNewBlock method. This method is automatically called by SteemJ if a notification is received from the Steem Node.

The last thing you need to do is to make the Steem Node and SteemJ aware of your implementation by passing it to the API.

MyCustomCallback myCallback = new MyCustomCallback();
steemApiWrapper.setBlockAppliedCallback(myCallback);

Code Quality


SonarQube

What is new?

Below you can find all changes made in this release.

Functional Updates

  • The following issues have been fixed:
    • #54 Implement the applied block callback.
    • #60 Enable Test-Network support.
    • #42 Implement core id types (e.g. block_id_type) to offer additional functionalities and a more accurate parsing.
    • Finally fix #36 Could not create a Post with SteemJ 0.3.2.
    • Finalize fix of #55 CustomOperation do not work.
      • CustomJsonOperation has been fixed so it is finally possible to follow/unfollow other accounts and to reblog posts with SteemJ.
      • CustomOperation fixed
      • CustomBinaryOperation fixed

Code Quality Improvements

  • Additional integration tests have been added.

Documentation

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

How to add it 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 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.

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 or ping me on GitHub.


If you want to stay up to date or just like the stuff I am doing it would be great if you could press the button below =).



follow me

Thanks for reading and best regards,
@dez1337

H2
H3
H4
3 columns
2 columns
1 column
19 Comments