whatser 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -228,6 +228,10 @@ Follows represent a user's interest in another user, namely the user's spot acti
228
228
 
229
229
  <Whatser::Follow @location="Amsterdam, NL", @avatar_pic="http://example.com/avatars/thumb/1.jpg", @promoted=false, @name="Example User", @id=1>
230
230
 
231
+ You can also get a list of a given user's followers either directly through a user, or the Follow class.
232
+
233
+ Whatser.client.follows.followers( user_id, :page => 1, :per_page => 10 )
234
+ following_users = user.followers( :page => 1, :per_page => 10 )
231
235
 
232
236
  === Check Ins
233
237
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.0
1
+ 0.6.1
@@ -10,6 +10,10 @@ module Whatser
10
10
  api_request :get, "/api/follows", {:query => opts}
11
11
  end
12
12
 
13
+ def followers(id, opts={})
14
+ api_request :get, "/api/users/#{id}/followers", {:query => opts}
15
+ end
16
+
13
17
  def suggested(opts={})
14
18
  api_request :get, "/api/users/suggested", {:query => opts}
15
19
  end
@@ -57,6 +57,10 @@ module Whatser
57
57
  Whatser::Follow.set(self.class.client).connection(id)
58
58
  end
59
59
 
60
+ def followers(params={})
61
+ Whatser::Follow.set(self.class.client).followers(id, params)
62
+ end
63
+
60
64
  def thanks(poi_id,params={})
61
65
  api_request :post, "/api/users/#{id}/poi/#{poi_id}/thanks", {:query => params}
62
66
  end
@@ -11,6 +11,10 @@ class TestFollow < Test::Unit::TestCase
11
11
  assert @client.follows.list(:page => 1).is_a?(Whatser::Response)
12
12
  end
13
13
 
14
+ def test_followers
15
+ assert @client.follows.followers(@user_id, :page => 1).is_a?(Whatser::Response)
16
+ end
17
+
14
18
  def test_suggested
15
19
  assert @client.follows.suggested(:page => 1).is_a?(Whatser::Response)
16
20
  end
@@ -53,6 +53,10 @@ class TestUser < Test::Unit::TestCase
53
53
  def test_connection
54
54
  assert @user.connection.is_a?(Whatser::Response)
55
55
  end
56
+
57
+ def test_followers
58
+ assert @user.followers.is_a?(Whatser::Response)
59
+ end
56
60
 
57
61
  def test_thanks
58
62
  assert @user.thanks(1, :opt => 'test').is_a?(Whatser::Response)
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{whatser}
8
- s.version = "0.6.0"
8
+ s.version = "0.6.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Travis Dunn"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: whatser
3
3
  version: !ruby/object:Gem::Version
4
- hash: 7
4
+ hash: 5
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 6
9
- - 0
10
- version: 0.6.0
9
+ - 1
10
+ version: 0.6.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Travis Dunn