Skip to content
This repository has been archived by the owner on Jun 1, 2022. It is now read-only.
/ steem_api Public archive

Rails compatible gem that provides full DB connection and models to SteemSQL.com

License

Notifications You must be signed in to change notification settings

netuoso/steem_api

Repository files navigation

SteemApi

Gem Version

How To Use (Rails 4+)

  • Add Gem to Gemfile
    • gem 'steem_api', '~> 1.1'
  • Bundle Install Gems
    • bundle install

How to Subscribe

As of 2018-01-23, SteemSQL is moving to a monthly subscription model. To use this gem, you must subscribe to @steemsql and store the credentials as environment variables.

Prerequeisits

Linux

apt-get update && apt-get install -yq freetds-dev freetds-bin

macOS

brew install freetds

How To Use (Standalone)

  • gem install steem_api
  • export STEEMSQL_HOST=
  • export STEEMSQL_USERNAME=
  • export STEEMSQL_PASSWORD=
  • irb
  • require 'steem_api'
  • SteemApi::Comment.last

Models

  • Account
  • Block
  • Comment
  • Token
  • Transaction

Followers

How to query today's followers:

followers = SteemApi::Tx::Custom::Follow
followers.following(:ned).today.count

Resteem

How to query today's "resteems":

reblogs = SteemApi::Tx::Custom::Reblog
reblogs.author(:netuoso).today.count

Account Witness Proxy

How to query current accounts that are actively using a proxy:

proxied = SteemApi::Tx::AccountWitnessProxy.active('netuoso')
proxied.pluck(:account)

Appiations

How to query comments by application:

comments = SteemApi::Comment.app('esteem').where(author: 'good-karma')

How To Contribute

  • Fork this repo
  • Branch off Master and make your changes
  • Submit a PR to this repo's Master branch

License

About

Rails compatible gem that provides full DB connection and models to SteemSQL.com

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages