Lionshare alternatives and similar gems
Based on the "Abstraction" category.
Alternatively, view Lionshare alternatives based on common mentions on social networks and blogs.
-
Interactor
Interactor provides a common interface for performing complex user interactions. -
wisper
A micro library providing Ruby objects with Publish-Subscribe capabilities -
ActiveInteraction
:briefcase: Manage application specific business logic. -
Decent Exposure
A helper for creating declarative interfaces in controllers -
Mutations
Compose your business logic into commands that sanitize and validate input. -
Rails Event Store
A Ruby implementation of an Event Store based on Active Record -
dry-types
Flexible type system for Ruby with coercions and constraints -
Light Service
Series of Actions with an emphasis on simplicity. -
Amoeba
A ruby gem to allow the copying of ActiveRecord objects and their associated children, configurable with a DSL on the model -
SimpleCommand
A simple, standardized way to build and use Service Objects (aka Commands) in Ruby -
Waterfall
A slice of functional programming to chain ruby services and blocks, thus providing a new approach to flow control. Make them flow! -
u-service
Represent use cases in a simple and powerful way while writing modular, expressive and sequentially logical code. -
PageletRails
Improve perceived performance of your rails application with minimum effort -
Surrounded
Create encapsulated systems of objects and focus on their interactions -
Smart Init - Simple service objects in Ruby
A simple gem for eliminating Ruby initializers boilerplate code, and providing unified service objects API -
SuperModule
SuperModule allows defining class methods and method invocations the same way a super class does without using def included(base). This also succeeds ActiveSupport::Concern by offering lighter syntax -
skinny_controllers
A pattern for allowing for easier testing of large projects' business logic -
Invokable
Objects are functions! Treat any Object or Class as a Proc (like Enumerable but for Procs). -
EasilyTypable
Ruby module that facilitates English-like type checking in an inheritance hierarchy via "type_name?" methods -
grpc_serializer
A simple library to encode nested hash to grpc object and vice versa -
simple_active_link_to
Simple rails view helper to manage "active" state of a link -
dry-rb
dry-rb is a collection of next-generation Ruby libraries, each intended to encapsulate a common task.
Static code analysis for 29 languages.
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of Lionshare or a related project?
README
Lionshare
A Ruby interface to the Lionshare API.
Installation
Add this line to your application's Gemfile:
gem 'lionshare'
And then execute:
$ bundle
Or install it yourself as:
$ gem install lionshare
Usage
Initialize client:
client = Lionshare::Client.new
Configuration
By default, requests are sent to https://api.lionshare.capital/api
You can change url to your own instance
config/initializers/lionshare.rb
Lionshare::Settings.configure do |config|
config.api_url = 'https://exchange.domain.com/api'
end
Prices
client.prices.get
Response:
{"data"=>{"BTC"=>[1755, 1780.32, 1794.99, 1781.91, 1777.96, 1782, 1794.99, 1785.54, 1795.52, 1843, 1877.6, 1880.91, 1848.77], "ETH"=>[91.27, 88.59, 89.34, 89.28, 88.77, 87.28, 88.36, 89.08, 88.41, 87.16, 88.2, 89.7, 90.33], "LTC"=>[37.1, 36.16, 34.31, 31.72, 32.41, 33.55, 32.82, 32.21, 29.92, 31.71, 31.2, 32.27, 32.79]}}
or with period
key
hour | day | week | month | year
client.prices.get(period: :hour)
Response:
{"data"=>{"BTC"=>[1852, 1851.98, 1851.39, 1851.96, 1851.88, 1851.96, 1852.95, 1853, 1852.96, 1852.95, 1853, 1852.99, 1853], "ETH"=>[89.75, 89.4, 89.59, 89.58, 89.54, 89.52, 89.48, 89.39, 89.46, 89.39, 89.21, 89.18, 88.9], "LTC"=>[31.82, 31.9, 31.94, 31.92, 31.94, 31.87, 31.96, 31.81, 31.66, 31.45, 31.64, 31.73, 31.63]}}
Response:
Markets
client.markets.get(period: :hour)
Response:
{"data"=>{"BTC"=>28317131524, "ETH"=>8372895792, "XRP"=>6477081639, "LTC"=>1562510222, "XEM"=>1104930000, "DASH"=>704585094, "ETC"=>606619545, "XMR"=>417501622}}
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/kirillshevch/lionshare.
License
The gem is available as open source under the terms of the MIT License.
*Note that all licence references and agreements mentioned in the Lionshare README section above
are relevant to that project's source code only.