Utopian API Ruby client

Words
220
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.

Technology Stack

Ruby V2.4
Gem V2.6.11

Roadmap

The current implementation is a wrapper of Utopian API and the returned values are all in JSON. Next release will be focusing on modelling Utopian entities e.g. add classes including moderator, supervisor, post etc to make developers’ life easier.

Test

A set of rspec test has been written here: 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

This gem has been registered in rubygems.org:
image.png

Assuming you already have Ruby development configured, then run:

gem install utopian_ruby_api

How to use it?

Get moderator information

Get all moderators JSON:

require 'utopian_ruby_api'
UtopianRuby::UtopianRubyAPI.get_moderators()["results"]

Get a particular moderator’s metadata

UtopianRuby::UtopianRubyAPI.get_moderator('elear')

Check if a user is a moderator

UtopianRuby::UtopianRubyAPI.is_moderator('elear')

Check if a user is a supervisor

UtopianRuby::UtopianRubyAPI.is_supervisor('espoem')

Get sponsor information

Get all sponsors in JSON

UtopianRuby::UtopianRubyAPI.get_sponsors()["results"]

Check if a user is a sponsor

UtopianRuby::UtopianRubyAPI.is_sponsor('ned')

Get a post information in JSON

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

Get Utopian status

Get Utopian current status

UtopianRuby::UtopianRubyAPI.stats()

Check if Utopian bot is voting

UtopianRuby::UtopianRubyAPI.is_voting()

Proof of work

I have added my Steemit account link in the README:

image.png



Posted on Utopian.io - Rewarding Open Source Contributors

Utopian API Ruby client | Ecency