social_net 0.2.14 → 0.2.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/social_net/facebook/api/scrape_request.rb +72 -0
- data/lib/social_net/facebook/errors/unknown_video.rb +11 -0
- data/lib/social_net/facebook/errors.rb +1 -0
- data/lib/social_net/facebook/models/user.rb +15 -1
- data/lib/social_net/facebook/models/video.rb +60 -0
- data/lib/social_net/facebook/models.rb +1 -0
- data/lib/social_net/version.rb +1 -1
- data/spec/social_net/facebook/models/users_spec.rb +29 -1
- data/spec/social_net/facebook/models/video_spec.rb +28 -0
- data/spec/support/cassettes/SocialNet_Facebook_Models_User/_find_video/given_a_nonexistant_video_video_id/.yml +65 -0
- data/spec/support/cassettes/SocialNet_Facebook_Models_User/_find_video/given_an_existing_video_id/returns_an_object_representing_a_video.yml +67 -0
- data/spec/support/cassettes/SocialNet_Facebook_Models_Video/_find_by_id/given_a_nonexistant_video_video_id/.yml +9767 -0
- data/spec/support/cassettes/SocialNet_Facebook_Models_Video/_find_by_id/given_an_existing_public_video_s_video_id/returns_an_object_representing_that_video.yml +30217 -0
- data/spec/support/vcr.rb +1 -1
- metadata +15 -2
data/spec/support/vcr.rb
CHANGED
@@ -9,7 +9,7 @@ VCR.configure do |c|
|
|
9
9
|
c.filter_sensitive_data('ACCESS_TOKEN') do |interaction|
|
10
10
|
if interaction.request.headers['Authorization']
|
11
11
|
interaction.request.headers['Authorization'].first
|
12
|
-
elsif interaction.response.body.include?('is_private') || interaction.response.body.include?('Page Not Found')
|
12
|
+
elsif interaction.response.body.include?('is_private') || interaction.response.body.include?('Page Not Found') || interaction.response.body.include?('DOCTYPE')
|
13
13
|
nil
|
14
14
|
else
|
15
15
|
JSON(interaction.response.body)['access_token']
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: social_net
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeremy Cohen Hoffing
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-06-
|
11
|
+
date: 2018-06-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -153,13 +153,16 @@ files:
|
|
153
153
|
- lib/social_net/facebook.rb
|
154
154
|
- lib/social_net/facebook/api/configuration.rb
|
155
155
|
- lib/social_net/facebook/api/request.rb
|
156
|
+
- lib/social_net/facebook/api/scrape_request.rb
|
156
157
|
- lib/social_net/facebook/config.rb
|
157
158
|
- lib/social_net/facebook/errors.rb
|
158
159
|
- lib/social_net/facebook/errors/response_error.rb
|
159
160
|
- lib/social_net/facebook/errors/unknown_user.rb
|
161
|
+
- lib/social_net/facebook/errors/unknown_video.rb
|
160
162
|
- lib/social_net/facebook/models.rb
|
161
163
|
- lib/social_net/facebook/models/page.rb
|
162
164
|
- lib/social_net/facebook/models/user.rb
|
165
|
+
- lib/social_net/facebook/models/video.rb
|
163
166
|
- lib/social_net/instagram.rb
|
164
167
|
- lib/social_net/instagram/api/configuration.rb
|
165
168
|
- lib/social_net/instagram/api/request.rb
|
@@ -189,12 +192,17 @@ files:
|
|
189
192
|
- social_net.gemspec
|
190
193
|
- spec/social_net/facebook/models/pages_spec.rb
|
191
194
|
- spec/social_net/facebook/models/users_spec.rb
|
195
|
+
- spec/social_net/facebook/models/video_spec.rb
|
192
196
|
- spec/social_net/instagram/models/user_spec.rb
|
193
197
|
- spec/social_net/instagram/models/video_spec.rb
|
194
198
|
- spec/social_net/twitter/models/user_spec.rb
|
195
199
|
- spec/spec_helper.rb
|
196
200
|
- spec/support/cassettes/Posts/_posts/given_an_existing_case-insensitive_username/returns_an_object_representing_that_user.yml
|
197
201
|
- spec/support/cassettes/Posts/_posts/given_an_unknown_username/.yml
|
202
|
+
- spec/support/cassettes/SocialNet_Facebook_Models_User/_find_video/given_a_nonexistant_video_video_id/.yml
|
203
|
+
- spec/support/cassettes/SocialNet_Facebook_Models_User/_find_video/given_an_existing_video_id/returns_an_object_representing_a_video.yml
|
204
|
+
- spec/support/cassettes/SocialNet_Facebook_Models_Video/_find_by_id/given_a_nonexistant_video_video_id/.yml
|
205
|
+
- spec/support/cassettes/SocialNet_Facebook_Models_Video/_find_by_id/given_an_existing_public_video_s_video_id/returns_an_object_representing_that_video.yml
|
198
206
|
- spec/support/cassettes/SocialNet_Instagram_Models_User/_find_by/given_an_existing_case-insensitive_username/returns_an_object_representing_that_user.yml
|
199
207
|
- spec/support/cassettes/SocialNet_Instagram_Models_User/_find_by/given_an_unknown_username/.yml
|
200
208
|
- spec/support/cassettes/SocialNet_Instagram_Models_User/_find_by_/given_a_private_username/.yml
|
@@ -234,12 +242,17 @@ summary: An API Client for social networks
|
|
234
242
|
test_files:
|
235
243
|
- spec/social_net/facebook/models/pages_spec.rb
|
236
244
|
- spec/social_net/facebook/models/users_spec.rb
|
245
|
+
- spec/social_net/facebook/models/video_spec.rb
|
237
246
|
- spec/social_net/instagram/models/user_spec.rb
|
238
247
|
- spec/social_net/instagram/models/video_spec.rb
|
239
248
|
- spec/social_net/twitter/models/user_spec.rb
|
240
249
|
- spec/spec_helper.rb
|
241
250
|
- spec/support/cassettes/Posts/_posts/given_an_existing_case-insensitive_username/returns_an_object_representing_that_user.yml
|
242
251
|
- spec/support/cassettes/Posts/_posts/given_an_unknown_username/.yml
|
252
|
+
- spec/support/cassettes/SocialNet_Facebook_Models_User/_find_video/given_a_nonexistant_video_video_id/.yml
|
253
|
+
- spec/support/cassettes/SocialNet_Facebook_Models_User/_find_video/given_an_existing_video_id/returns_an_object_representing_a_video.yml
|
254
|
+
- spec/support/cassettes/SocialNet_Facebook_Models_Video/_find_by_id/given_a_nonexistant_video_video_id/.yml
|
255
|
+
- spec/support/cassettes/SocialNet_Facebook_Models_Video/_find_by_id/given_an_existing_public_video_s_video_id/returns_an_object_representing_that_video.yml
|
243
256
|
- spec/support/cassettes/SocialNet_Instagram_Models_User/_find_by/given_an_existing_case-insensitive_username/returns_an_object_representing_that_user.yml
|
244
257
|
- spec/support/cassettes/SocialNet_Instagram_Models_User/_find_by/given_an_unknown_username/.yml
|
245
258
|
- spec/support/cassettes/SocialNet_Instagram_Models_User/_find_by_/given_a_private_username/.yml
|