totter 0.4.3 → 0.4.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -12,6 +12,7 @@ module Totter
12
12
  include Choices
13
13
  include Comments
14
14
  include Configuration
15
+ include Connections
15
16
  include Decisions
16
17
  include Slugs
17
18
  include Stickers
@@ -0,0 +1,16 @@
1
+ module Totter
2
+ class Client
3
+ # Client methods for working with connection objects
4
+ module Connections
5
+ # Performs a find friends operation for a given connection token
6
+ #
7
+ # @param token [String] The connection token
8
+ # @return [Hashie::Mash]
9
+ # @example
10
+ # Totter.find_connection_friends('abc1234')
11
+ def find_connection_friends(token)
12
+ post("connections/#{token}/find_friends").body
13
+ end
14
+ end
15
+ end
16
+ end
@@ -96,17 +96,6 @@ module Totter
96
96
  get("users/#{user_id}/votes").body
97
97
  end
98
98
 
99
- # Find friends on social networks
100
- #
101
- # @return Array of [Hashie::Mash]
102
- # @param user_id [String] ID of the user
103
- # @example
104
- # client.following('5')
105
- def social_find_friends(user_id)
106
- post("users/#{user_id}/social_find_friends").body
107
- end
108
-
109
-
110
99
  end
111
100
  end
112
101
  end
@@ -1,4 +1,4 @@
1
1
  module Totter
2
2
  # Verion of the Totter gem
3
- VERSION = '0.4.3'
3
+ VERSION = '0.4.4'
4
4
  end
@@ -0,0 +1,8 @@
1
+ require 'test_helper'
2
+
3
+ class ConnectionsTest < Totter::TestCase
4
+ def test_find_connection_friends
5
+ stub_request(:post, 'http://localhost:5000/v1/connections/1234/find_friends').to_return(:status => 200, :body => "{}")
6
+ assert_equal Hashie::Mash.new, local_client.find_connection_friends('1234')
7
+ end
8
+ end
@@ -77,9 +77,4 @@ class UsersTest < Totter::TestCase
77
77
  end
78
78
  end
79
79
  end
80
-
81
- def test_social_find_friends
82
- stub_request(:post, 'http://localhost:5000/v1/users/1/social_find_friends').to_return(:status => 200, :body => "{}")
83
- assert_equal Hashie::Mash.new, local_client.social_find_friends(1)
84
- end
85
80
  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.3
4
+ version: 0.4.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2013-05-08 00:00:00.000000000 Z
14
+ date: 2013-05-09 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: multi_json
@@ -69,6 +69,7 @@ files:
69
69
  - lib/totter/client/choices.rb
70
70
  - lib/totter/client/comments.rb
71
71
  - lib/totter/client/configuration.rb
72
+ - lib/totter/client/connections.rb
72
73
  - lib/totter/client/decisions.rb
73
74
  - lib/totter/client/slugs.rb
74
75
  - lib/totter/client/stickers.rb
@@ -129,6 +130,7 @@ files:
129
130
  - test/totter/client/choices_test.rb
130
131
  - test/totter/client/comments_test.rb
131
132
  - test/totter/client/configuration_test.rb
133
+ - test/totter/client/connections_test.rb
132
134
  - test/totter/client/decisions_test.rb
133
135
  - test/totter/client/slugs_test.rb
134
136
  - test/totter/client/stickers_test.rb
@@ -160,7 +162,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
160
162
  version: '0'
161
163
  segments:
162
164
  - 0
163
- hash: 3067976961979527316
165
+ hash: -3762032386541266324
164
166
  requirements: []
165
167
  rubyforge_project:
166
168
  rubygems_version: 1.8.23
@@ -217,6 +219,7 @@ test_files:
217
219
  - test/totter/client/choices_test.rb
218
220
  - test/totter/client/comments_test.rb
219
221
  - test/totter/client/configuration_test.rb
222
+ - test/totter/client/connections_test.rb
220
223
  - test/totter/client/decisions_test.rb
221
224
  - test/totter/client/slugs_test.rb
222
225
  - test/totter/client/stickers_test.rb