class Punchtab::Client
Attributes
access_token[R]
Public Class Methods
new(options = {})
click to toggle source
authentication api methods
# File lib/punchtab.rb, line 21 def initialize(options = {}) # initialize the API @api = Punchtab::API.new(options) # authenticate @access_token = @api.authenticate end
version()
click to toggle source
# File lib/punchtab.rb, line 16 def self.version Punchtab::VERSION end
Public Instance Methods
create_activity(activity_name, options={})
click to toggle source
# File lib/punchtab.rb, line 43 def create_activity(activity_name, options={}) @api.create_activity(activity_name, options) end
get_activity(options={})
click to toggle source
activity api methods
# File lib/punchtab.rb, line 39 def get_activity(options={}) @api.get_activity(options) end
get_leaderboard(options={})
click to toggle source
leaderboard api methods
# File lib/punchtab.rb, line 62 def get_leaderboard(options={}) @api.get_leaderboard(options) end
get_reward(options={})
click to toggle source
reward api methods
# File lib/punchtab.rb, line 57 def get_reward(options={}) @api.get_reward(options) end
get_user()
click to toggle source
user api methods
# File lib/punchtab.rb, line 52 def get_user @api.get_user end
logout()
click to toggle source
# File lib/punchtab.rb, line 34 def logout @api.logout end
redeem_activity_offer(reward_id)
click to toggle source
# File lib/punchtab.rb, line 47 def redeem_activity_offer(reward_id) @api.redeem_activity_offer(reward_id) end
status()
click to toggle source
# File lib/punchtab.rb, line 30 def status @api.status end