chrisjpowers / fat_num
- Source
- Commits
- Network (0)
- Issues (0)
- Downloads (0)
- Wiki (1)
- Graphs
-
Branch:
master
Chris Powers (author)
Sat Mar 14 11:50:14 -0700 2009
fat_num /
| name | age | message | |
|---|---|---|---|
| |
LICENSE | ||
| |
README.rdoc | ||
| |
fat_num.gemspec | ||
| |
lib/ |
README.rdoc
FatNum
Chris Powers
The FatNum gem is a client for the simple API of www.fatnum.com.
Getting Setup
First off, go to www.fatnum.com and sign up for an account. Create a new statistic and note the five-character token of your stat.
Example
require 'rubygems'
require 'fat_num'
f = FatNum.new('your@email.com', 'password')
# get your statistic
response = f.get('e37gh')
response.digit #=> 120
response.description #=> 'batches left'
# update your statistic
f.update('e37gh', 119)
# sure enough, our update was successful
f.get('e37gh').digit #=> 119

