README.rdoc in whatser-0.2.0 vs README.rdoc in whatser-0.3.0
- old
+ new
@@ -26,17 +26,18 @@
gem 'whatser', :git => "git@github.com:sogeo/whatser"
And instantiate a Whatser client as need:
- client = Whatser::Client.new(:api_key => 'key', :api_secret => 'secret', :oauth_token => '123abc')
+ client = Whatser::Client.new(:api_key => 'key', :api_secret => 'secret', :oauth_token => '123abc', :logger => Rails.logger)
or...
Whatser::Client.configure do |config|
config.api_key = 'key'
config.api_secret = 'secret'
+ config.logger = Rails.logger
end
client1 = Whatser::Client.new( :oauth_token => '123abc' )
client2 = Whatser::Client.new( :oauth_token => '789xyz' )
=== 2. Authenticate a User
@@ -148,10 +149,14 @@
As a convenience you can also iterate over a collection's spot data:
collection = Whatser::Collection.new( [spot1, spot2, spot3] )
collection.each { |c| puts c.name }
+If a user somehow discovers a spot due to another user's recommendation or similar, you can explicitly thank them for the recommendation, slightly increasing the user's Whatser reputation and influence as an opinion leader.
+
+ user.thanks( spot_id, :message => 'thanks, this spot looks great', :facebook => true, :twitter => true)
+
=== Cities
A user's cities represent the cities in which they have collected spots.
Whatser.client.cities.mine( :page => 1, :per_page => 10 )
@@ -254,9 +259,20 @@
Whatser.client.data_sources.for_users( :user_id => [101,23], :page => 1, :per_page => 10 )
m = Whatser.client.data_sources.find( 1 )
redirect_to m.subscription_url(:display => 'touch')
<Whatser::DataSource @review_count=405, @poi_count=0, @price=0.0, @collection_count=0, @name="Rough Guides - Barcelona", @media_count=0, @id=9, @users=[{"name": "premium user", "id": 33}]>
+
+
+=== Activity Feeds
+
+User activity is recorded by the API, for example when a user adds or tags a POI, befriends another user, or uploads a photo. This activity is recorded in a user's activity feed, a collection of short messages detailing that user's activity. You can view feeds either by user, or globally.
+
+ Whatser.client.feed.user( user_id, :page => 1, :per_page => 10 )
+ Whatser.client.feed.mine( :page => 1, :per_page => 10 )
+ Whatser.client.feed.global( :page => 1, :per_page => 10 )
+
+ <Whatser::ActivityFeed @message="you uploaded a photo.", @poi_id=101, @object_avatar=nil, @user_avatar="http://example.com/avatars/imgs/1.jpg", @user_id=33, @object_name="Something", @user_name="This User", @object_id=1001, @poi_name="Some Spot", @city="Amsterdam">
=== Social Networks
The API integrates with several social networks (Facebook, Foursquare, Gowalla, and Twitter), allowing users from those networks to login from or connect their accounts with Whatser. All four networks are supported for connecting a user account (via the OAuth 2 web authorization flow), and disconnecting a user account. In addition, the API provides access to other select parts of these networks to support social media and location-based user activity.