module StatHat::Json::Api
Public Class Methods
future()
click to toggle source
# File lib/stathat/json/api.rb, line 15 def future @pool ||= StatHat::Json::Publisher.pool(size: ENV['STATHAT_PUBLISHER_POOL_SIZE'] || 10) @pool.future end
post_count(stat, count=1, t=nil)
click to toggle source
# File lib/stathat/json/api.rb, line 24 def post_count(stat, count=1, t=nil) StatHat::Json::Response.new(future.post_count(stat, count, t)) end
post_stats(stats)
click to toggle source
# File lib/stathat/json/api.rb, line 20 def post_stats(stats) StatHat::Json::Response.new(future.post_stats(stats)) end
post_value(stat, value, t=nil)
click to toggle source
# File lib/stathat/json/api.rb, line 28 def post_value(stat, value, t=nil) StatHat::Json::Response.new(future.post_value(stat, value, t)) end
sync_api()
click to toggle source
# File lib/stathat/json/api.rb, line 11 def sync_api StatHat::Json::SyncApi end