Project

badgeville

0.0
No commit activity in last 3 years
No release in over 3 years
Badgeville API client
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0

Runtime

 Project Readme

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)