[Help Wanted] – Help to improve SteemJ and earn a reward

Create a post that explains the getDiscussions method and earn 25 SBD or more.


SteemJV2Logo

Source left Orc - Source right Orc

[Help Wanted] – Help to improve SteemJ and earn a reward

Hello Steemians!

The development of the next SteemJ version is still ongoing and consumes a lot of my time. To speed this process up, I thought about asking for some help in the community. So if you ever wanted to contribute to SteemJ, here is your chance to do so and to get paid for it on top.

The Task

The database_api provided by a Steem Node has several methods to receive posts (aka discussions) based on the provided conditions. Sadly, I wasn’t able to find documentation for those methods and how they act in detail. The only way to finger this out seems to be testing it on my own.

The task itself is to write a tutorial here on Steemit that fulfills the following requirements:

  • For each “get_discussions_by” method (11 in total):
    • Explain what the method is used for
    • Explain which fields of the “discussion_query” object needs to be set and which fields are not allowed to be set (I guess there are some).
    • Provide a small snippet using SteemJ
  • Describe every field of the “discussion_query” object (12 in total) and their usage (e.g. The tag field is used to filter for discussions that have been posted with this main tag)
  • Post the link to your post in the comment section below until theend of October 2017.

The idea is to reuse your post to:

  • Create proper JavaDoc for the “getDiscussionsBy” method of SteemJ
  • Create proper Unit-Tests
  • Provide a proper documentation

Due to that your post should be written in English and should have a good quality in general :) - Thanks!

The reward

I really appropriate any help I can get, but I guess that this may not be enough motivation :P – Therefore I thought about the following reward for the first post that fulfills the requirements described above:

  • You will receive the SBD reward of this post if it is higher than 25 SBD – If not, I’ll pay 25 SBD from my own Wallet.
  • I’ll resteem your post with the @steemj and the @dez1337 so it can reach more than 500 people that are potentially interested in your post.

Technical Background

To make the task a little bit easier, here are some useful information.

As a look at the original Steem source code will be really helpful for sure, here is the link to the “database_api” which contains the “get_discussions_by*” methods: https://github.com/steemit/steem/blob/master/libraries/app/database_api.cpp

Beside that, here is the original code of the “discussion_query” struct:

/**
* Defines the arguments to a query as a struct so it can be easily extended
*/
struct discussion_query {
void validate()const{
FC_ASSERT( filter_tags.find(tag) == filter_tags.end() );
FC_ASSERT( limit <= 100 );
}

string tag;
uint32_t limit = 0;
set<string> filter_tags;
set<string> select_authors; ///< list of authors to include, posts not by this author are filtered
set<string> select_tags; ///< list of tags to include, posts without these tags are filtered
uint32_t truncate_body = 0; ///< the number of bytes of the post body to return, 0 for all
optional<string> start_author;
optional<string> start_permlink;
optional<string> parent_author;
optional<string> parent_permlink;
};

For your tests and for creating the snippets you need the latest version of SteemJ (a pre release of version 0.4.0) which can be downloaded here: https://oss.sonatype.org/content/repositories/releases/eu/bittrade/libs/steemj-core/0.4.0pr1/

Or added as a dependency to a Maven project using:

<dependency>
            <groupId>eu.bittrade.libs</groupId>
            <artifactId>steemj-core</artifactId>
            <version>0.4.0pr1</version>
</dependency>

In SteemJ all “get_discussions_by” methods are aggregated in a single method:

getDiscussionsBy(DiscussionQuery discussionQuery, DiscussionSortType sortBy)

As described above, please provide snippets for all 12 DiscussionSortTypes.

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 meFollow @dez1337
follow mefollow dez1337


Thanks for reading and best regards,
@dez1337

H2
H3
H4
3 columns
2 columns
1 column
7 Comments