SteemJ Dev Diary #3 (03.01.2018) - The MarketHistoryAPI rework
utopian-io·@dez1337·
0.000 HBDSteemJ Dev Diary #3 (03.01.2018) - The MarketHistoryAPI rework
*Day #3 of the SteemJ Dev Diary was mainly focused on the MarketHistoryAPI rework and a knowledge transfer with @paatrick.* <center>  </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 #3 (03.01.2018) - The MarketHistoryAPI rework <br>Hello Steemians and welcome back to day #3 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 #3 The main task I was working on was [Issue #179 - Refactor the market_history api to work with the new args/return concept](https://github.com/marvin-we/steem-java-api-wrapper/issues/179) which is about the adjustments of the 'MarketHistoryAPI' to work with the new '_args' and '_return' objects. I could nearly complete this task by creating the following objects: * core/src/main/java/eu/bittrade/libs/steemj/plugins/apis/market/history/models/GetMarketHistoryArgs.java * core/src/main/java/eu/bittrade/libs/steemj/plugins/apis/market/history/models/GetMarketHistoryBucketsReturn.java * core/src/main/java/eu/bittrade/libs/steemj/plugins/apis/market/history/models/GetMarketHistoryReturn.java * core/src/main/java/eu/bittrade/libs/steemj/plugins/apis/market/history/models/GetOrderBookArgs.java * core/src/main/java/eu/bittrade/libs/steemj/plugins/apis/market/history/models/GetRecentTradesArgs.java * core/src/main/java/eu/bittrade/libs/steemj/plugins/apis/market/history/models/GetRecentTradesReturn.java * core/src/main/java/eu/bittrade/libs/steemj/plugins/apis/market/history/models/GetTradeHistoryArgs.java * core/src/main/java/eu/bittrade/libs/steemj/plugins/apis/market/history/models/GetTradeHistoryReturn.java which have been pushed in [commit 057dfad5b1e06c779a2274a1abf4b8958dc09b53](https://github.com/marvin-we/steem-java-api-wrapper/commit/057dfad5b1e06c779a2274a1abf4b8958dc09b53). For now only some JavaDoc is missing to finish the first API (of 12 APIs in total). Something that cost a lot of time today was a knowledge transfer with @paatrick. @paatrick is a colleague of mine since several years and has to listen to my crypto stories in nearly every lunch break. He wanted to support SteemJ since several weeks already and today we both found the time to do a knowledge transfer. @paatrick had a first look on the FollowAPI rework and also contributed the first changes - You may want to checkout his blog too =). 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) *(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))* # 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-3-03-01-2018-the-markethistoryapi-rework">Utopian.io - Rewarding Open Source Contributors</a></em><hr/>
👍 steemj, dez1337, matildapurse, luigi-tecnologo, dehenne, forexbrokr, cub2, lisa.palmer, remlaps1, remlaps2, teamsteem, pupmisfit, muksihs, sergey44, inertia, paatrick, newsrx, mirahu, ms10398, ardina, utopian-io, bitsnaps,