Introducing steemconnect4j
Repositories
Repository | Link |
---|---|
steemconnect4j | https://github.com/hapramp/steemconnect4j |
Example Project | https://github.com/hapramp/SteemConnectSampleApp |
1. About steemconnect4j
A Java SDK for SteemConnect v2
1.1. Need for a SteemConnect Java SDK
SteemConnect has now become a standard for authentication in Steem based decentralized applications. A lot of popular Steem apps like @busy.org, @dtube, @dmania, etc. are now using SteemConnect for authenticating users.
Developing web apps using SteemConnect is simple, thanks to the steemconnect-sdk for JS. But it is difficult to develop Java-based applications like Android, Jetty, etc. on the top of SteemConnect.
In order to make this process convenient, I developed this SDK which can be used by anyone to develop SteemConnect based Java apps.
1.2. Introduction
steemconnect4j is an SDK for using SteemConnect v2 (SC2) API in Java-based projects like Android, Jetty, etc. It provides simple methods to interact with the Steem blockchain using access token received from the SteemConnect API.
1.3. Current Features
As of now, steemconnect4j offers the following features -
- Initialization using all possible parameters
- Getting login URL
- Getting user profile
- Voting on a post
- Replying to a post via comment
- Getting link to sign transactions
- Revoking Token/Logging out
- Reblogging
- Follow/Unfollow
- Ignoring other user(s)
- Claining rewards
- Updating user's metadata
2. Tech
2.1. Technologies Used
Task | Tech/Tool | Link(s) |
---|---|---|
Build Tool | Gradle | Root config steemconnect4j config |
Test Coverage | Jacoco | Config |
Linting | Checkstyle | Config file |
Package Repository | JitPack | Repository |
2.2. Using with Gradle
In order to add the SDK to a Gradle based project, make sure that you have JitPack in repositories for your root config -
After this, just add steemconnect4j
as project dependency and you are good to go -
2.3. API Documentation
You can find all the documentation for the API in the project's README file.
2.4. Testing, Coverage, and Linting using Travis CI
Travis CI is used to ensure that all the tests pass and a considerable amount of code is covered under tests. It uses hard checks on checkstyle so that even warnings turn into errors while CI build.
Here is what the Travis configuration looks like -
3. Example Implementation
To test the proper functioning of the SDK, I developed an Android application that authenticates a user and displays their information in the app.
3.1. Code and Repository
The application's source code is open source on Github - https://github.com/hapramp/SteemConnectSampleApp.
Minimum SDK version for the project is 17 and targetted SDK version is 27.
3.2. Demo
Enough talk! See it in action -
4. Future Plans
The SDK will be used in HapRamp's Android app for authentication and other actions like voting, commenting, etc. I aim to resolve all the bugs present in the SDK during this process.
I am also working on improving the test coverage for the code and wish to take it to decent numbers.
5. How to contribute?
The project is open to contributions in any way possible. If you find a bug, please open an issue in the project's issue tracker. For submitting code patches, feel free to open pull requests on Github.
5.1. Creating a Pull Request
Here's the basic flow for contributing to the project -
- Fork the project.
- Clone your forked version of the project.
- Checkout a new branch.
- Make desired changes.
- Commit your changes with a proper commit message.
- Push your local branch.
- Go to Github and create a pull request.
- Done 🎉
5.2. Join the Conversation
If you wish to talk, please join HapRamp's Discord channel - https://discord.gg/r9vwcHe.
Thanks for the amazing contribution, @hapramp (@bxute)! This is the kind of contribution I love to see on Utopian! Great work on creating something that provides a lot of value to the Steem community in general - this is definitely an easy staff pick for me!
I'm already looking forward to your future contributions!
Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.
To view those questions and the relevant answers related to your post, click here.
Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]
That's awesome! We've added SteemConnect4J in the list of libraries here https://github.com/steemit/steemconnect/wiki/Libraries
Hooray 🚀
Thanks, @fabien!
Hey @hapramp
Thanks for contributing on Utopian.
Congratulations! Your contribution was Staff Picked to receive a maximum vote for the development category on Utopian for being of significant value to the project and the open source community.
We’re already looking forward to your next contribution!
Contributing on Utopian
Learn how to contribute on our website or by watching this tutorial on Youtube.
Want to chat? Join us on Discord https://discord.gg/h52nFrV.
Vote for Utopian Witness!
Congratulations @hapramp! You have completed the following achievement on Steemit and have been rewarded with new badge(s) :
Award for the total payout received
Click on the badge to view your Board of Honor.
If you no longer want to receive notifications, reply to this comment with the word
STOP
Do not miss the last post from @steemitboard:
SteemitBoard World Cup Contest - Colombia vs England
Participate in the SteemitBoard World Cup Contest!
Collect World Cup badges and win free SBD
Support the Gold Sponsors of the contest: @good-karma and @lukestokes