social_net 0.2.9 → 0.2.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 51ddea69ba088d0900cbd5ab5ce4581f7c651c80
4
- data.tar.gz: ed0c2efee1001e56d30e7450ad72bd6c4a069183
3
+ metadata.gz: 40df815906bf5307c729879e97005763f6e80de5
4
+ data.tar.gz: 75136538f3bd177933d295ae755a5ac7d9dbb9c4
5
5
  SHA512:
6
- metadata.gz: 78c5274678063132fa64a6e2254087641a0e5e725a5257b6abad6f11ddd31af91d4d7dc7272c87f8ad9eed99c6f4e03c2ece40a846ed7a39c348231ea75ef531
7
- data.tar.gz: dc9790a3c100d5dbeaac0863a8fb9f0e342858a27d4657b3aa4bb38af7653afe04f750b0459fc80f37ee96ff01a17988ef5c28e9e6b7af6517a8b55a707678f8
6
+ metadata.gz: 5f6916f4d58b6e35f2fb9ea2a51d881c07bec2858ee86426d3d17b4c7b4f9d6de2e1801280fb850bea2ef9575cca67bb791fc4e74b1e38c835ed4c69a7023678
7
+ data.tar.gz: e8e71ab40d76c27d7de33a83550ec377b30d00c132369320931ad45f9c10c3531e57dd2d21ef199d52d52ff5ee31461f2cc66b201f6a6b7419954c77d3e12e05
data/CHANGELOG.md CHANGED
@@ -37,3 +37,7 @@ For more information about changelogs, check
37
37
  ## 0.2.9 - 2017-11-30
38
38
 
39
39
  * [FEATURE] Add `Instagram::Video` support for `find_by private_shortcode:` and `find_by! private_shortcode:`
40
+
41
+ ## 0.2.10 - 2017-12-20
42
+
43
+ * [BUGFIX] Return nil for an Private Instagram video's caption if it doesn't exist.
@@ -48,11 +48,13 @@ module SocialNet
48
48
  raise Errors::UnknownVideo unless video_data[:is_video]
49
49
  {}.tap do |video|
50
50
  video['id'] = video_data[:shortcode]
51
- video['caption'] = {'text' => video_data[:edge_media_to_caption][:edges][0][:node][:text]}
52
51
  video['likes'] = {'count' => video_data[:edge_media_preview_like][:count]}
53
52
  video['videos'] = {'standard_resolution' => {'url' => video_data[:video_url]}}
54
53
  video['images'] = {'standard_resolution' => {'url' => video_data[:display_url]}}
55
54
  video['link'] = "https://www.instagram.com/p/#{video_data[:shortcode]}/"
55
+ if video_data[:edge_media_to_caption][:edges].present?
56
+ video['caption'] = {'text' => video_data[:edge_media_to_caption][:edges][0][:node][:text]}
57
+ end
56
58
  end
57
59
  end
58
60
 
@@ -1,3 +1,3 @@
1
1
  module SocialNet
2
- VERSION = "0.2.9"
2
+ VERSION = "0.2.10"
3
3
  end
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.9
4
+ version: 0.2.10
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: 2017-11-30 00:00:00.000000000 Z
11
+ date: 2017-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport