Utopian API Ruby client V0.0.3

in utopian-io •  7 years ago  (edited)

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 497 downloads so far from Rubygems.

Here is a summary of work being done for this submission:

  • Add get_categories() method and rspec test
  • Add a new helper class: UtopianRubyHelper
  • Add get_posts_by_type() method (and rspec test) to return posts under a certain category
  • Add get_posts_obj_by_type() method to return post objects under a certain category
  • Add get_posts_obj_by_moderator() method (and rspec test) to return post objects reviewed by a certain moderator
  • Add get_post_repository() method to return the github repository URL for a particular post

Technology Stack

Ruby V2.4
Gem V2.6.11

Roadmap

Utopian API Ruby Client V0.0.1
Utopian API Ruby Client V0.0.2

Test

A set of rspec test has been written in:

https://github.com/yuxir/utopian-ruby/blob/master/spec/utopian_ruby_spec.rb

and

https://github.com/yuxir/utopian-ruby/blob/master/spec/utopian_ruby_helper_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 categories

require 'utopian_ruby_api'

UtopianRuby::UtopianRubyAPI.get_categories()

Get posts by category

UtopianRuby::UtopianRubyHelper.get_posts_by_type("development",{"limit":5})

Get post objects by category

UtopianRuby::UtopianRubyHelper.get_posts_obj_by_type("development",{"limit":5})

Get post objects by moderator

UtopianRuby::UtopianRubyHelper.get_posts_obj_by_moderator("helo",{"limit":10,"type":"development"})

Get post repository

UtopianRuby::UtopianRubyHelper.get_post_repository('yuxi','utopian-api-ruby-client')

Proof of work

I have added my Steemit account link in the README:



Posted on Utopian.io - Rewarding Open Source Contributors

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Thank you for the contribution. It has been approved.

Please put more work in your future contributions.

You can contact us on Discord.
[utopian-moderator]

Thanks, will do.

Hey @ms10398, I just gave you a tip for your hard work on moderation. Upvote this comment to support the utopian moderators and increase your future rewards!

Hey @yuxi I am @utopian-io. I have just upvoted you!

Achievements

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

Great introduction to API.