Access HiveSQL.io data from your ruby/rails application.
How to Subscribe
Note: HiveSQL is a monthly subscription. To use this gem, you must subscribe to @hivesql and store the credentials as environment variables.
First, install ruby. One way to do this is install rvm. Once ruby is installed, install
hive_sql with the
gem install hive_sql
Or, add it to your
How To Use (Standalone)
gem install hive_sql export HIVESQL_HOST=<your hivesql host> export HIVESQL_USERNAME=<your hivesql username> export HIVESQL_PASSWORD=<your hivesql password> hive_sql top upvoted
The above example will query the top upvoted content for the last 7 days.
- various operations
How to query today's followers:
followers = :::::: followers.following(:alice).today.count
How to query today's reblogs:
reblogs = :::::: reblogs.(:alice).today.count
Account Witness Proxy
How to query current accounts that are actively using a proxy:
proxied = ::::.active('alice') proxied.pluck(:account)
How to query comments by application:
comments = ::.app('esteem').where(author: 'good-karma')
Get in touch!
If you're using HiveSQL with ruby, I'd love to hear from you. Drop me a line and tell me what you think! I'm @inertia on Hive.
Please note that this gem just provides access to the HiveSQL data services are provided by @arcange.