Skip to content

rmehner/badgeville

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

Badgeville API

Client for Badgeville API http://rules.badgeville.com/

Note

We're in the process of rewriting this gem to have more features in a cleaner and well tested way.

We work directly in master, so if you're brave and want to help, load the master version in your app and report back if something breaks / doesn't work as advertised. We're using master in one of our production apps and it works fine so far.

If you want to have a stable version, use the released one that is available on rubygems.org. We'll keep the deprecated usage for the next release, but will remove that eventually in near future.

Have a look at the Changelog to get a feeling of what changes and what is added with the upcoming version

Deprecated Usage

First, checkout the examples folder. TL;DR:

  • create connection object with your api_key, and secret.
require 'badgeville'
settings = JSON.parse(File.read('keys.json.example'))
badgeville = Badgeville::Client.new(email, settings)
  • register user and player on site
badgeville.create_player
  • get player id
badgeville.player_info
  • log actions
badgeville.log_activity "commented"
  • get all logged activities
badgeville.get_activities
  • get list of reward definitions
badgeville.reward_definitions
  • manually award some reward
badgeville.award "Best User"

Installing

  1. add to your Gemfile
gem 'badgeville'
  1. Create a keys.json file with your api_key and secret (see keys.json.example file)

About

Ruby Badgeville Client

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages