totter 0.4.6 → 0.4.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/totter/client/stickers.rb +12 -0
- data/lib/totter/version.rb +1 -1
- data/test/totter/client/activities_test.rb +3 -3
- data/test/totter/client/stickers_test.rb +6 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 077243f17198f8987481a35be493c0b93e47fff2
|
4
|
+
data.tar.gz: 28854a996e1bb0a3e79996d1129c95e4ab11f74c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/lib/totter/version.rb
CHANGED
@@ -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=
|
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=
|
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=
|
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.
|
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-
|
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:
|