Class: StatHat::SyncAPI

Inherits:
Object
  • Object
show all
Defined in:
lib/stathat.rb

Class Method Summary collapse

Class Method Details

.ez_post_count(stat_name, ezkey, count, timestamp = nil) ⇒ Object



48
49
50
51
52
53
54
# File 'lib/stathat.rb', line 48

def ez_post_count(stat_name, ezkey, count, timestamp=nil)
        args = { :stat => stat_name,
                :ezkey => ezkey,
                :count => count }
        args[:t] = timestamp unless timestamp.nil?
        Common::send_to_stathat(Common::EZ_URL, args)
end

.ez_post_value(stat_name, ezkey, value, timestamp = nil) ⇒ Object



40
41
42
43
44
45
46
# File 'lib/stathat.rb', line 40

def ez_post_value(stat_name, ezkey, value, timestamp=nil)
        args = { :stat => stat_name,
                :ezkey => ezkey,
                :value => value }
        args[:t] = timestamp unless timestamp.nil?
        Common::send_to_stathat(Common::EZ_URL, args)
end

.post_count(stat_key, user_key, count, timestamp = nil) ⇒ Object



56
57
58
59
60
61
62
# File 'lib/stathat.rb', line 56

def post_count(stat_key, user_key, count, timestamp=nil)
        args = { :key => stat_key,
                :ukey => user_key,
                :count => count }
        args[:t] = timestamp unless timestamp.nil?
        Common::send_to_stathat(Common::CLASSIC_COUNT_URL, args)
end

.post_value(stat_key, user_key, value, timestamp = nil) ⇒ Object



64
65
66
67
68
69
70
# File 'lib/stathat.rb', line 64

def post_value(stat_key, user_key, value, timestamp=nil)
        args = { :key => stat_key,
                :ukey => user_key,
                :value => value }
        args[:t] = timestamp unless timestamp.nil?
        Common::send_to_stathat(Common::CLASSIC_VALUE_URL, args)
end