Skip to content

Instantly share code, notes, and snippets.

# Recursively remove all SVN folders
find . -name .svn -print0 | xargs -0 rm -rf
require 'satisfaction'
sfn = Satisfaction.new
# Let's find the subject of my latest topic
sfn.people["scott"].topics.page(1, :order => 'recently_created').first.subject #=> "Here's to Rene *Cheers*"
# HTTP call: http://api.getsatisfaction.com/people/scott/topics?order=recently_created
# GET
sfn.people.get("scott") #=> <person>
# PAGE
sfn.topics.page(3, :order => 'most_flagged') #=> [<Topic>, <Topic>, ...]
me = sfn.people["scott"] # no API call takes place, [] is an alias of get
# The load takes place during the following statement
puts me.name # => "Scott Fleckenstein"
sfn.set_consumer("consumerkey", "consumersecret")
sfn.set_token("token", "tokensecret")
CREATE TABLE http_cache (
url VARCHAR(1024),
headers BLOB,
content BLOB,
fetched_on_server DATETIME NOT NULL,
fecthed_on TIMESTAMP NOT NULL DEFAULT current_timestamp ON UPDATE current_timestamp
);
$consumer_data = array(
'key' => $consumer_key,
'secret' => $consumer_secret
);
<h1>Companies in Get Satisfaction</h1>
<ul>
<li>
<div id="hcard-audible" class="vcard company">
<a href="http://api.getsatisfaction.com/companies/17631" class="fn org url" rel="me">Audible.com</a>
<span class="id">17631</span>
<a href="/companies/17631/topics" rel="topics">Audible.com's topics</a>
<a href="/companies/17631/people" rel="people">Audible.com's people</a>
<a href="/companies/17631/products" rel="products">Audible.com's products</a>
<a href="/companies/17631/tags" rel="tags">Audible.com's tags</a>
<div id="hcard-satisfaction" class="vcard company">
<a href="http://api.getsatisfaction.com/companies/4" class="fn org url" rel="me">Get Satisfaction</a>
<img alt="Gslogo_large" class="logo" src="/uploaded_images/0000/0132/GSlogo_large.png?1204645287" />
<!-- Satisfaction specific record ID -->
<span class="id">4</span>
<!-- The companies description -->
<span class="note">Welcome to the Get Satisfaction customer service site. This is the place to share questions, ideas, problems and praise about Get Satisfaction's tools and services.</span>
<title>People in Get Satisfaction</title>
<h1>People</h1>
<ul>
<li>
<div class="vcard person">
<a href="http://api.getsatisfaction.com/people/167761" class="fn nickname url">Mr.B</a>
<span class="note">the more you learn the less you know</span>
<span class="canonical_name">mrb</span>
</div>
</li>