Utopian API Ruby client V0.0.2

Words
202
Reading
1 min
Listen
Play
9y

What is the project about?

This project is a wrapper of Utopian APIs. It provides an easy way to use Utopian APIs for Ruby developers. I am very glad to see that this gem has got 279 downloads from Rubygems since last submission.

Here is a summary of work being done for this submission:
https://github.com/yuxir/utopian-ruby/commits/master

Technology Stack

Ruby V2.4
Gem V2.6.11

Roadmap

V0.0.1: it provides a wrapper of Utopian API and the returned values are all in JSON.
V0.0.2(This submission): add moderator and post classes to make developers’ life easier.
Next release: will be focusing on adding more helper classes.

Test

A set of rspec tests has been added into this file: https://github.com/yuxir/utopian-ruby/blob/master/spec/utopian_ruby_spec.rb

How to contribute?

Just fork this project, create your feature branch, commit your changes and send a pull request!

https://github.com/yuxir/utopian-ruby

Installation

Assuming you already have Ruby development configured, then run:

gem install utopian_ruby_api

How to use it? (New features only)

Get moderator information

Get all moderators objects:

require 'utopian_ruby_api'

UtopianRuby::UtopianRubyAPI.get_moderators_obj().each do |m|
      puts m.account
end

Get a particular moderator’s object

UtopianRuby::UtopianRubyAPI.get_moderator_obj('elear')

Get posts

Get post objects

UtopianRuby::UtopianRubyAPI.get_posts_obj({"limit":2}).each do |p|
      puts p.author
      puts p.moderator
end

Get a particular post object:

UtopianRuby::UtopianRubyAPI.get_post_obj('espoem','old-moderated-posts-are-received-and-shown-instead-of-the-recent-one')

Proof of work

I have added my Steemit account link in the README:



Posted on Utopian.io - Rewarding Open Source Contributors

Utopian API Ruby client V0.0.2 | Ecency