totter 0.4.6 → 0.4.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1a7ed6f925ed7fab0b1a98e141f887893e0b6740
4
- data.tar.gz: 495a714f8fc19a0ca03d8956a1b87b769e1096ab
3
+ metadata.gz: 077243f17198f8987481a35be493c0b93e47fff2
4
+ data.tar.gz: 28854a996e1bb0a3e79996d1129c95e4ab11f74c
5
5
  SHA512:
6
- metadata.gz: 146ba1896ada290b77854176e096ae919c9604e98647911f564442fafd1b76d58f58802422d1c6e252ca8c4ccdc483354c54b49e049d865e0dec56cbe30040a5
7
- data.tar.gz: 8c2b003e3c853072f3c99630a72d3aae83aa419036526737cbc5db3ceb1f2defb72369c6d8edbe4f0607655a6b98ec839e73dff10becb7f56436d60e9816932e
6
+ metadata.gz: b2f803da2c2134963f18c01eb107208c778caf38050c43a267ca5243e56aee67d9d2657c4f15d4766e8c901efb43f16666b6246a9a64c27f38a0f03f4499209e
7
+ data.tar.gz: cf113ff4eb35c5c8ee690b9da8c96a21108f51c410d7a4a3b4b6668dbcc94b302c33b96e8f24a39701a479c66cd194bbb7d1e372f3f7d15a732de6956791d129
@@ -11,6 +11,18 @@ module Totter
11
11
  def sticker(sticker_name)
12
12
  get("stickers/#{sticker_name}").body
13
13
  end
14
+
15
+ # Follow all users with a specific sticker
16
+ #
17
+ # Requires authenticated client.
18
+ #
19
+ # @param sticker [String] sticker to follow
20
+ # @return [Boolean] True if follow was successful, false otherwise
21
+ # @example
22
+ # client.follow_sticker('featured')
23
+ def follow_sticker(sticker)
24
+ boolean_from_response(:post, "stickers/#{sticker}/follow")
25
+ end
14
26
  end
15
27
  end
16
28
  end
@@ -1,4 +1,4 @@
1
1
  module Totter
2
2
  # Verion of the Totter gem
3
- VERSION = '0.4.6'
3
+ VERSION = '0.4.7'
4
4
  end
@@ -2,19 +2,19 @@ require 'test_helper'
2
2
 
3
3
  class ActivitiesTest < Totter::TestCase
4
4
  def test_activity
5
- stub_request(:get, 'http://localhost:5000/v1/users/4/activities?limit=50&offset=0').to_return(:status => 200, :body => "[]")
5
+ stub_request(:get, 'http://localhost:5000/v1/users/4/activities?limit=1000&offset=0').to_return(:status => 200, :body => "[]")
6
6
  result = local_client.activities(4)
7
7
  assert_equal 0, result.length
8
8
  end
9
9
 
10
10
  def test_my_activity
11
- stub_request(:get, 'http://localhost:5000/v1/me/activities?limit=50&offset=0').to_return(:status => 200, :body => "[]")
11
+ stub_request(:get, 'http://localhost:5000/v1/me/activities?limit=1000&offset=0').to_return(:status => 200, :body => "[]")
12
12
  result = local_client.my_activities
13
13
  assert_equal 0, result.length
14
14
  end
15
15
 
16
16
  def test_friends_activity
17
- stub_request(:get, 'http://localhost:5000/v1/me/activities/friends?limit=50&offset=0').to_return(:status => 200, :body => "[]")
17
+ stub_request(:get, 'http://localhost:5000/v1/me/activities/friends?limit=1000&offset=0').to_return(:status => 200, :body => "[]")
18
18
  result = local_client.friends_activities
19
19
  assert_equal 0, result.length
20
20
  end
@@ -10,4 +10,10 @@ class StickersTest < Totter::TestCase
10
10
  assert_equal 0, users.length
11
11
  end
12
12
  end
13
+
14
+ def test_follow_sticker
15
+ stub_request(:post, 'http://localhost:5000/v1/stickers/featured/follow').to_return(:status => 200)
16
+ result = local_client.follow_sticker('featured')
17
+ assert result
18
+ end
13
19
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: totter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.6
4
+ version: 0.4.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Soffes
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-05-20 00:00:00.000000000 Z
13
+ date: 2013-05-24 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: multi_json
@@ -220,3 +220,4 @@ test_files:
220
220
  - test/totter/client_test.rb
221
221
  - test/totter/transport/http_test.rb
222
222
  - test/totter_test.rb
223
+ has_rdoc: