social_net 0.2.7 → 0.2.8

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: d377f2038172fd76217e4af11f4529fe4635fc54
4
- data.tar.gz: d0dd25976061611f287fa340e092465f6146ae8d
3
+ metadata.gz: da1ec029f8e3eb345ac3f9d82c1e7ce7ab315422
4
+ data.tar.gz: 767b0656bc913dd35441590b255bdd0b01844bee
5
5
  SHA512:
6
- metadata.gz: e79cb37ae71a214c5440efd7b56c9c35e7e51bba4ccfda16eb4f8be9dfcde2679f5d50ef413b920d70f16f4b9a9f1bb02b6b5c2c44106427fdbfa801fa6b9330
7
- data.tar.gz: 098b3b67bb8016f108b2fd94f535ebbb945fe929ddb874ab692ec5c937717edf120c443857157d7f5eb95cecfdbbbba53b7f024714e41da768b254864abcde70
6
+ metadata.gz: 945111cde0bd3e1a3450126817b9ca5998b04f0866c8029a1347cc0ce6e50067645fde647eecbb35659620bab6753a81a9554989e1864db4a9e9933b927d246a
7
+ data.tar.gz: 87256259fff7c1d66d690012960f9f7c1481857ae56b28f6222b57fe3a3ceaa90be9e9fc45dc4949948d052661122d26913f69afb8d0803b7d8f8776f36181e3
data/CHANGELOG.md CHANGED
@@ -29,3 +29,7 @@ For more information about changelogs, check
29
29
  ## 0.2.7 - 2017-7-26
30
30
 
31
31
  * [FEATURE] Add `Instagram::Video` support for `find_by media_id:` and `find_by! media_id:`
32
+
33
+ ## 0.2.8 - 2017-7-27
34
+
35
+ * [FEATURE] Add `Instagram::Video` support for `find_by shortcode:` and `find_by! shortcode:`
data/README.md CHANGED
@@ -102,11 +102,14 @@ user.videos #=>
102
102
  Use [SocialNet::Instagram::Video]() to:
103
103
 
104
104
  * retrieve an Instagram video by media id
105
+ * retrieve an Instagram video by shortcode
105
106
 
106
107
  ```ruby
107
- video = SocialNet::Instagram::Video.find_by media_id: '1531332985868221389'
108
- video.link #=> 'https://www.instagram.com/p/BVAYzy_g3vN/'
109
- video.file #=> 'https://scontent.cdninstagram.com/t50.2886-16/18954088_1445442168855176_8271610702855143424_n.mp4'
108
+ video = SocialNet::Instagram::Video.find_by media_id: '1566861445805885015'
109
+ video = SocialNet::Instagram::Video.find_by shortcode: 'BW-nC7xg8ZX'
110
+
111
+ video.link #=> 'https://www.instagram.com/p/BW-nC7xg8ZX/'
112
+ video.file #=> 'https://scontent.cdninstagram.com/t50.2886-16/20372137_156190564936990_2601958215176421376_n.mp4'
110
113
  ```
111
114
 
112
115
  *The methods above require a configured Instagram app (see below).*
@@ -40,6 +40,8 @@ module SocialNet
40
40
  def self.find_by!(params = {})
41
41
  if params[:media_id]
42
42
  find_by_id! params[:media_id]
43
+ elsif params[:shortcode]
44
+ find_by_id! "shortcode/#{params[:shortcode]}"
43
45
  end
44
46
  end
45
47
 
@@ -47,7 +49,9 @@ module SocialNet
47
49
 
48
50
  def self.find_by_id!(id)
49
51
  request = Api::Request.new endpoint: "media/#{id}"
50
- new request.run
52
+ video = request.run
53
+ raise Errors::UnknownVideo if video['type'] == 'image'
54
+ new video
51
55
  rescue Errors::ResponseError => error
52
56
  case error.response
53
57
  when Net::HTTPBadRequest then raise Errors::UnknownVideo
@@ -1,3 +1,3 @@
1
1
  module SocialNet
2
- VERSION = "0.2.7"
2
+ VERSION = "0.2.8"
3
3
  end
@@ -12,8 +12,11 @@ describe SocialNet::Instagram::Video, :vcr do
12
12
 
13
13
  let(:existing_media_id) { '1531332985868221389' }
14
14
  let(:unknown_media_id) { '31231231231231232' }
15
+ let(:existing_video_shortcode) { 'BW-nC7xg8ZX' }
16
+ let(:unknown_shortcode) { 'BQ-nC7xg8ZX' }
17
+ let(:existing_image_shortcode) { 'BW8yP8FgXZt' }
15
18
 
16
- describe '.find_by' do
19
+ describe '.find_by media_id' do
17
20
  subject(:video) { SocialNet::Instagram::Video.find_by media_id: media_id }
18
21
 
19
22
  context 'given an existing video\'s media id' do
@@ -31,7 +34,7 @@ describe SocialNet::Instagram::Video, :vcr do
31
34
  end
32
35
  end
33
36
 
34
- describe '.find_by!' do
37
+ describe '.find_by! media_id' do
35
38
  subject(:video) { SocialNet::Instagram::Video.find_by! media_id: media_id }
36
39
 
37
40
  context 'given an existing video\'s media id' do
@@ -48,4 +51,27 @@ describe SocialNet::Instagram::Video, :vcr do
48
51
  it { expect{video}.to raise_error SocialNet::Instagram::UnknownVideo }
49
52
  end
50
53
  end
54
+
55
+ describe '.find_by! shortcode' do
56
+ subject(:video) { SocialNet::Instagram::Video.find_by! shortcode: shortcode }
57
+
58
+ context 'given an existing video\'s shortcode' do
59
+ let(:shortcode) { existing_video_shortcode }
60
+
61
+ it 'returns an object representing that video' do
62
+ expect(video.id).to eq '1566861445805885015_487786346'
63
+ expect(video.link).to eq 'https://www.instagram.com/p/BW-nC7xg8ZX/'
64
+ end
65
+ end
66
+
67
+ context 'given a nonexistant video shortcode' do
68
+ let(:shortcode) { unknown_shortcode }
69
+ it { expect{video}.to raise_error SocialNet::Instagram::UnknownVideo }
70
+ end
71
+
72
+ context 'given an existing image shortcode' do
73
+ let(:shortcode) { existing_image_shortcode }
74
+ it { expect{video}.to raise_error SocialNet::Instagram::UnknownVideo }
75
+ end
76
+ end
51
77
  end
@@ -23,7 +23,7 @@ http_interactions:
23
23
  X-Ratelimit-Limit:
24
24
  - '5000'
25
25
  X-Ratelimit-Remaining:
26
- - '4965'
26
+ - '4984'
27
27
  Cache-Control:
28
28
  - private, no-cache, no-store, must-revalidate
29
29
  Pragma:
@@ -35,11 +35,11 @@ http_interactions:
35
35
  Content-Language:
36
36
  - en
37
37
  Date:
38
- - Wed, 26 Jul 2017 23:54:13 GMT
38
+ - Thu, 27 Jul 2017 19:38:35 GMT
39
39
  Set-Cookie:
40
- - csrftoken=j41eKlQbLj0zVbPl8wuhhy59nkmzQR7X; expires=Wed, 25-Jul-2018 23:54:13
40
+ - csrftoken=O1XfrgPYnySc9eDj9CeLmEOTik10X2iC; expires=Thu, 26-Jul-2018 19:38:35
41
41
  GMT; Max-Age=31449600; Path=/; Secure
42
- - rur=FTW; Path=/
42
+ - rur=FRC; Path=/
43
43
  Connection:
44
44
  - keep-alive
45
45
  Content-Length:
@@ -49,5 +49,5 @@ http_interactions:
49
49
  string: '{"meta": {"code": 400, "error_type": "APINotFoundError", "error_message":
50
50
  "invalid media id"}}'
51
51
  http_version:
52
- recorded_at: Wed, 26 Jul 2017 23:54:13 GMT
52
+ recorded_at: Thu, 27 Jul 2017 19:38:35 GMT
53
53
  recorded_with: VCR 2.9.3
@@ -23,7 +23,7 @@ http_interactions:
23
23
  X-Ratelimit-Limit:
24
24
  - '5000'
25
25
  X-Ratelimit-Remaining:
26
- - '4964'
26
+ - '4985'
27
27
  Cache-Control:
28
28
  - private, no-cache, no-store, must-revalidate
29
29
  Pragma:
@@ -35,11 +35,11 @@ http_interactions:
35
35
  Content-Language:
36
36
  - en
37
37
  Date:
38
- - Wed, 26 Jul 2017 23:54:13 GMT
38
+ - Thu, 27 Jul 2017 19:38:34 GMT
39
39
  Set-Cookie:
40
- - csrftoken=xKRuZk6RsOUSQn97DtfuDRTUnirdrFVa; expires=Wed, 25-Jul-2018 23:54:13
40
+ - csrftoken=xbuHrg8FggVY3hQRyeBIPnBe5g5SMYd2; expires=Thu, 26-Jul-2018 19:38:34
41
41
  GMT; Max-Age=31449600; Path=/; Secure
42
- - rur=FTW; Path=/
42
+ - rur=FRC; Path=/
43
43
  Connection:
44
44
  - keep-alive
45
45
  Content-Length:
@@ -65,5 +65,5 @@ http_interactions:
65
65
  "low_resolution": {"width": 480, "height": 480, "url": "https://scontent.cdninstagram.com/t50.2886-16/18928806_320856988345914_4131951279704375296_n.mp4"}}},
66
66
  "meta": {"code": 200}}'
67
67
  http_version:
68
- recorded_at: Wed, 26 Jul 2017 23:54:13 GMT
68
+ recorded_at: Thu, 27 Jul 2017 19:38:34 GMT
69
69
  recorded_with: VCR 2.9.3
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://api.instagram.com/v1/media/31231231231231232?access_token=INSTAGRAM_ACCESS_TOKEN
5
+ uri: https://api.instagram.com/v1/media/shortcode/BQ-nC7xg8ZX?access_token=INSTAGRAM_ACCESS_TOKEN
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -23,7 +23,7 @@ http_interactions:
23
23
  X-Ratelimit-Limit:
24
24
  - '5000'
25
25
  X-Ratelimit-Remaining:
26
- - '4963'
26
+ - '4982'
27
27
  Cache-Control:
28
28
  - private, no-cache, no-store, must-revalidate
29
29
  Pragma:
@@ -35,11 +35,11 @@ http_interactions:
35
35
  Content-Language:
36
36
  - en
37
37
  Date:
38
- - Wed, 26 Jul 2017 23:54:14 GMT
38
+ - Thu, 27 Jul 2017 19:38:35 GMT
39
39
  Set-Cookie:
40
- - csrftoken=xIFSTEGyONB8IpDt7S1nEWUSvWovvWJp; expires=Wed, 25-Jul-2018 23:54:14
40
+ - csrftoken=CpPwDnP4bX67JnIW9NSRsM0K6lDIeBVK; expires=Thu, 26-Jul-2018 19:38:35
41
41
  GMT; Max-Age=31449600; Path=/; Secure
42
- - rur=FTW; Path=/
42
+ - rur=FRC; Path=/
43
43
  Connection:
44
44
  - keep-alive
45
45
  Content-Length:
@@ -49,5 +49,5 @@ http_interactions:
49
49
  string: '{"meta": {"code": 400, "error_type": "APINotFoundError", "error_message":
50
50
  "invalid media id"}}'
51
51
  http_version:
52
- recorded_at: Wed, 26 Jul 2017 23:54:14 GMT
52
+ recorded_at: Thu, 27 Jul 2017 19:38:35 GMT
53
53
  recorded_with: VCR 2.9.3
@@ -0,0 +1,91 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.instagram.com/v1/media/shortcode/BW8yP8FgXZt?access_token=INSTAGRAM_ACCESS_TOKEN
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Content-Type:
22
+ - application/json; charset=utf-8
23
+ X-Ratelimit-Limit:
24
+ - '5000'
25
+ X-Ratelimit-Remaining:
26
+ - '4986'
27
+ Cache-Control:
28
+ - private, no-cache, no-store, must-revalidate
29
+ Pragma:
30
+ - no-cache
31
+ Expires:
32
+ - Sat, 01 Jan 2000 00:00:00 GMT
33
+ Vary:
34
+ - Cookie, Accept-Language, Accept-Encoding
35
+ Content-Language:
36
+ - en
37
+ Date:
38
+ - Thu, 27 Jul 2017 19:38:30 GMT
39
+ Set-Cookie:
40
+ - csrftoken=UOSSAlqFmUbRcljWokxgjU3K5mJ4JvDu; expires=Thu, 26-Jul-2018 19:38:30
41
+ GMT; Max-Age=31449600; Path=/; Secure
42
+ - rur=FRC; Path=/
43
+ Connection:
44
+ - keep-alive
45
+ Content-Length:
46
+ - '1337'
47
+ body:
48
+ encoding: ASCII-8BIT
49
+ string: '{"data": {"id": "1566347768052676205_487786346", "user": {"id": "487786346",
50
+ "full_name": "Collab", "profile_picture": "https://scontent.cdninstagram.com/t51.2885-19/s150x150/18380272_1415230358523681_1718467959032119296_a.jpg",
51
+ "username": "collab"}, "images": {"thumbnail": {"width": 150, "height": 150,
52
+ "url": "https://scontent.cdninstagram.com/t51.2885-15/s150x150/e35/c58.0.963.963/20225306_1964653293814332_1850808958122459136_n.jpg"},
53
+ "low_resolution": {"width": 320, "height": 285, "url": "https://scontent.cdninstagram.com/t51.2885-15/s320x320/e35/20225306_1964653293814332_1850808958122459136_n.jpg"},
54
+ "standard_resolution": {"width": 640, "height": 570, "url": "https://scontent.cdninstagram.com/t51.2885-15/s640x640/sh0.08/e35/20225306_1964653293814332_1850808958122459136_n.jpg"}},
55
+ "created_time": "1500943226", "caption": {"id": "17867912779140215", "text":
56
+ "Miss the Collab x @NewHopeClub livestream? Blake loves a good romcom, George
57
+ can teleport, Reece is always down for a prank, and all the boys may be aliens.
58
+ Come hang with Collab weekdays on live.ly at 2:30PM PST. \ud83d\udc7d\ud83c\udfb8\ud83d\ude4c\n____\n#NewHopeClub
59
+ #musically #lively #CollabFam", "created_time": "1500943226", "from": {"id":
60
+ "487786346", "full_name": "Collab", "profile_picture": "https://scontent.cdninstagram.com/t51.2885-19/s150x150/18380272_1415230358523681_1718467959032119296_a.jpg",
61
+ "username": "collab"}}, "user_has_liked": false, "likes": {"count": 103},
62
+ "tags": ["musically", "newhopeclub", "collabfam", "lively"], "filter": "Normal",
63
+ "comments": {"count": 1}, "type": "image", "link": "https://www.instagram.com/p/BW8yP8FgXZt/",
64
+ "location": null, "attribution": null, "users_in_photo": [{"user": {"id":
65
+ "12468050", "full_name": "J U L I A \u2022 A B N E R", "profile_picture":
66
+ "https://scontent.cdninstagram.com/t51.2885-19/s150x150/18512602_1052410774891444_7398788660142800896_a.jpg",
67
+ "username": "juliaabner"}, "position": {"x": 0.8866666666666667, "y": 0.680373831775701}},
68
+ {"user": {"id": "21565883", "full_name": "Reece Bibby", "profile_picture":
69
+ "https://scontent.cdninstagram.com/t51.2885-19/s150x150/20066868_1427792173936290_460174422569910272_a.jpg",
70
+ "username": "newhopereece"}, "position": {"x": 0.3026666666666666, "y": 0.1345794392523365}},
71
+ {"user": {"id": "273978632", "full_name": "Will McFadden", "profile_picture":
72
+ "https://scontent.cdninstagram.com/t51.2885-19/s150x150/17661819_207451526408917_2143503239813791744_a.jpg",
73
+ "username": "willmcfadden"}, "position": {"x": 0.7013333333333334, "y": 0.4755140186915888}},
74
+ {"user": {"id": "362367244", "full_name": "Blake Richardson", "profile_picture":
75
+ "https://scontent.cdninstagram.com/t51.2885-19/s150x150/18299732_1823610774624697_3252079022405844992_a.jpg",
76
+ "username": "newhopeblake"}, "position": {"x": 0.4213333333333333, "y": 0.2078504672897196}},
77
+ {"user": {"id": "461171563", "full_name": "George Smith", "profile_picture":
78
+ "https://scontent.cdninstagram.com/t51.2885-19/s150x150/20065329_330688504048861_3205172348831399936_a.jpg",
79
+ "username": "newhopegeorge"}, "position": {"x": 0.12, "y": 0.4650467289719626}},
80
+ {"user": {"id": "1523104692", "full_name": "musical.ly", "profile_picture":
81
+ "https://scontent.cdninstagram.com/t51.2885-19/s150x150/15623723_1884415811791802_316399851170430976_n.jpg",
82
+ "username": "musical.ly"}, "position": {"x": 0.4786666666666667, "y": 0.8044859813084112}},
83
+ {"user": {"id": "2155383298", "full_name": "New Hope Club", "profile_picture":
84
+ "https://scontent.cdninstagram.com/t51.2885-19/s150x150/15624530_397945037221212_5299798607413641216_a.jpg",
85
+ "username": "newhopeclub"}, "position": {"x": 0.328, "y": 0.5577570093457944}},
86
+ {"user": {"id": "3289333658", "full_name": "live.ly", "profile_picture": "https://scontent.cdninstagram.com/t51.2885-19/s150x150/15034999_570474333148474_351167774640308224_a.jpg",
87
+ "username": "live.ly"}, "position": {"x": 0.2186666666666667, "y": 0.1958878504672897}}]},
88
+ "meta": {"code": 200}}'
89
+ http_version:
90
+ recorded_at: Thu, 27 Jul 2017 19:38:30 GMT
91
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,70 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.instagram.com/v1/media/shortcode/BW-nC7xg8ZX?access_token=INSTAGRAM_ACCESS_TOKEN
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Content-Type:
22
+ - application/json; charset=utf-8
23
+ X-Ratelimit-Limit:
24
+ - '5000'
25
+ X-Ratelimit-Remaining:
26
+ - '4983'
27
+ Cache-Control:
28
+ - private, no-cache, no-store, must-revalidate
29
+ Pragma:
30
+ - no-cache
31
+ Expires:
32
+ - Sat, 01 Jan 2000 00:00:00 GMT
33
+ Vary:
34
+ - Cookie, Accept-Language, Accept-Encoding
35
+ Content-Language:
36
+ - en
37
+ Date:
38
+ - Thu, 27 Jul 2017 19:38:35 GMT
39
+ Set-Cookie:
40
+ - csrftoken=h06eGTYAEOh7UwFsy3VzNYjWC6efmV7K; expires=Thu, 26-Jul-2018 19:38:35
41
+ GMT; Max-Age=31449600; Path=/; Secure
42
+ - rur=FRC; Path=/
43
+ Connection:
44
+ - keep-alive
45
+ Content-Length:
46
+ - '726'
47
+ body:
48
+ encoding: ASCII-8BIT
49
+ string: '{"data": {"id": "1566861445805885015_487786346", "user": {"id": "487786346",
50
+ "full_name": "Collab", "profile_picture": "https://scontent.cdninstagram.com/t51.2885-19/s150x150/18380272_1415230358523681_1718467959032119296_a.jpg",
51
+ "username": "collab"}, "images": {"thumbnail": {"width": 150, "height": 150,
52
+ "url": "https://scontent.cdninstagram.com/t51.2885-15/s150x150/e15/c0.76.612.612/20214481_1993293670904550_4498270337460338688_n.jpg"},
53
+ "low_resolution": {"width": 320, "height": 400, "url": "https://scontent.cdninstagram.com/t51.2885-15/e15/p320x320/20214481_1993293670904550_4498270337460338688_n.jpg"},
54
+ "standard_resolution": {"width": 612, "height": 765, "url": "https://scontent.cdninstagram.com/t51.2885-15/e15/20214481_1993293670904550_4498270337460338688_n.jpg"}},
55
+ "created_time": "1501004461", "caption": {"id": "17877475462121699", "text":
56
+ "Her: Babe some guy just asked for my number \u2800\nMe: Who?\u2800\nHer:
57
+ That guy over th.....\u2800\nMe:\u2800\n____\n\ud83c\udfa5: @thebestfailstbf
58
+ #fail #funnyvideos #beach #beachlife", "created_time": "1501004461", "from":
59
+ {"id": "487786346", "full_name": "Collab", "profile_picture": "https://scontent.cdninstagram.com/t51.2885-19/s150x150/18380272_1415230358523681_1718467959032119296_a.jpg",
60
+ "username": "collab"}}, "user_has_liked": false, "likes": {"count": 84}, "tags":
61
+ ["beach", "beachlife", "funnyvideos", "fail"], "filter": "Clarendon", "comments":
62
+ {"count": 4}, "type": "video", "link": "https://www.instagram.com/p/BW-nC7xg8ZX/",
63
+ "location": null, "attribution": null, "users_in_photo": [], "videos": {"standard_resolution":
64
+ {"width": 480, "height": 600, "url": "https://scontent.cdninstagram.com/t50.2886-16/20372137_156190564936990_2601958215176421376_n.mp4"},
65
+ "low_bandwidth": {"width": 480, "height": 600, "url": "https://scontent.cdninstagram.com/t50.2886-16/20372137_156190564936990_2601958215176421376_n.mp4"},
66
+ "low_resolution": {"width": 480, "height": 600, "url": "https://scontent.cdninstagram.com/t50.2886-16/20372137_156190564936990_2601958215176421376_n.mp4"}}},
67
+ "meta": {"code": 200}}'
68
+ http_version:
69
+ recorded_at: Thu, 27 Jul 2017 19:38:35 GMT
70
+ recorded_with: VCR 2.9.3
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: social_net
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Cohen Hoffing
@@ -185,10 +185,11 @@ files:
185
185
  - spec/support/cassettes/SocialNet_Instagram_Models_User/_find_by_/given_an_existing_case-insensitive_username/returns_an_object_representing_that_user.yml
186
186
  - spec/support/cassettes/SocialNet_Instagram_Models_User/_find_by_/given_an_unknown_username/.yml
187
187
  - spec/support/cassettes/SocialNet_Instagram_Models_User/_videos/given_an_existing_user/returns_an_array_of_video_posts_from_the_user.yml
188
- - spec/support/cassettes/SocialNet_Instagram_Models_Video/_find_by/given_a_nonexistant_video/.yml
189
- - spec/support/cassettes/SocialNet_Instagram_Models_Video/_find_by/given_an_existing_video_s_media_id/returns_an_object_representing_that_video.yml
190
- - spec/support/cassettes/SocialNet_Instagram_Models_Video/_find_by_/given_a_nonexistant_video/.yml
191
- - spec/support/cassettes/SocialNet_Instagram_Models_Video/_find_by_/given_an_existing_video_s_media_id/returns_an_object_representing_that_video.yml
188
+ - spec/support/cassettes/SocialNet_Instagram_Models_Video/_find_by_media_id/given_a_nonexistant_video/.yml
189
+ - spec/support/cassettes/SocialNet_Instagram_Models_Video/_find_by_media_id/given_an_existing_video_s_media_id/returns_an_object_representing_that_video.yml
190
+ - spec/support/cassettes/SocialNet_Instagram_Models_Video/_find_by_shortcode/given_a_nonexistant_video_shortcode/.yml
191
+ - spec/support/cassettes/SocialNet_Instagram_Models_Video/_find_by_shortcode/given_an_existing_image_shortcode/.yml
192
+ - spec/support/cassettes/SocialNet_Instagram_Models_Video/_find_by_shortcode/given_an_existing_video_s_shortcode/returns_an_object_representing_that_video.yml
192
193
  - spec/support/vcr.rb
193
194
  homepage: https://github.com/CollabCreators/social_net
194
195
  licenses:
@@ -229,9 +230,10 @@ test_files:
229
230
  - spec/support/cassettes/SocialNet_Instagram_Models_User/_find_by_/given_an_existing_case-insensitive_username/returns_an_object_representing_that_user.yml
230
231
  - spec/support/cassettes/SocialNet_Instagram_Models_User/_find_by_/given_an_unknown_username/.yml
231
232
  - spec/support/cassettes/SocialNet_Instagram_Models_User/_videos/given_an_existing_user/returns_an_array_of_video_posts_from_the_user.yml
232
- - spec/support/cassettes/SocialNet_Instagram_Models_Video/_find_by/given_a_nonexistant_video/.yml
233
- - spec/support/cassettes/SocialNet_Instagram_Models_Video/_find_by/given_an_existing_video_s_media_id/returns_an_object_representing_that_video.yml
234
- - spec/support/cassettes/SocialNet_Instagram_Models_Video/_find_by_/given_a_nonexistant_video/.yml
235
- - spec/support/cassettes/SocialNet_Instagram_Models_Video/_find_by_/given_an_existing_video_s_media_id/returns_an_object_representing_that_video.yml
233
+ - spec/support/cassettes/SocialNet_Instagram_Models_Video/_find_by_media_id/given_a_nonexistant_video/.yml
234
+ - spec/support/cassettes/SocialNet_Instagram_Models_Video/_find_by_media_id/given_an_existing_video_s_media_id/returns_an_object_representing_that_video.yml
235
+ - spec/support/cassettes/SocialNet_Instagram_Models_Video/_find_by_shortcode/given_a_nonexistant_video_shortcode/.yml
236
+ - spec/support/cassettes/SocialNet_Instagram_Models_Video/_find_by_shortcode/given_an_existing_image_shortcode/.yml
237
+ - spec/support/cassettes/SocialNet_Instagram_Models_Video/_find_by_shortcode/given_an_existing_video_s_shortcode/returns_an_object_representing_that_video.yml
236
238
  - spec/support/vcr.rb
237
239
  has_rdoc:
@@ -1,69 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: https://api.instagram.com/v1/media/1531332985868221389?access_token=INSTAGRAM_ACCESS_TOKEN
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- Accept-Encoding:
11
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
- Accept:
13
- - "*/*"
14
- User-Agent:
15
- - Ruby
16
- response:
17
- status:
18
- code: 200
19
- message: OK
20
- headers:
21
- Content-Type:
22
- - application/json; charset=utf-8
23
- X-Ratelimit-Limit:
24
- - '5000'
25
- X-Ratelimit-Remaining:
26
- - '4966'
27
- Cache-Control:
28
- - private, no-cache, no-store, must-revalidate
29
- Pragma:
30
- - no-cache
31
- Expires:
32
- - Sat, 01 Jan 2000 00:00:00 GMT
33
- Vary:
34
- - Cookie, Accept-Language, Accept-Encoding
35
- Content-Language:
36
- - en
37
- Date:
38
- - Wed, 26 Jul 2017 23:54:13 GMT
39
- Set-Cookie:
40
- - csrftoken=Wup5cI7PHEwOEWvIGvzpsEx5Rgp9LSrp; expires=Wed, 25-Jul-2018 23:54:13
41
- GMT; Max-Age=31449600; Path=/; Secure
42
- - rur=FTW; Path=/
43
- Connection:
44
- - keep-alive
45
- Content-Length:
46
- - '702'
47
- body:
48
- encoding: ASCII-8BIT
49
- string: '{"data": {"id": "1531332985868221389_2920261222", "user": {"id": "2920261222",
50
- "full_name": "EjamBrocolli", "profile_picture": "https://scontent.cdninstagram.com/t51.2885-19/s150x150/20181021_187099138494103_2678022811838054400_a.jpg",
51
- "username": "ejamtucker"}, "images": {"thumbnail": {"width": 150, "height":
52
- 150, "url": "https://scontent.cdninstagram.com/t51.2885-15/s150x150/e15/18948059_1942577789357229_5999747679591071744_n.jpg"},
53
- "low_resolution": {"width": 320, "height": 320, "url": "https://scontent.cdninstagram.com/t51.2885-15/s320x320/e15/18948059_1942577789357229_5999747679591071744_n.jpg"},
54
- "standard_resolution": {"width": 640, "height": 640, "url": "https://scontent.cdninstagram.com/t51.2885-15/e15/18948059_1942577789357229_5999747679591071744_n.jpg"}},
55
- "created_time": "1496769139", "caption": {"id": "17871224890103184", "text":
56
- "Yesterday Hit Me Hard \ud83c\udf51 #skate.my #Hallofmeat (Cukup Lah Ni Makanan
57
- Sahur)", "created_time": "1496769139", "from": {"id": "2920261222", "full_name":
58
- "EjamBrocolli", "profile_picture": "https://scontent.cdninstagram.com/t51.2885-19/s150x150/20181021_187099138494103_2678022811838054400_a.jpg",
59
- "username": "ejamtucker"}}, "user_has_liked": false, "likes": {"count": 112},
60
- "tags": ["hallofmeat", "skate"], "filter": "Normal", "comments": {"count":
61
- 17}, "type": "video", "link": "https://www.instagram.com/p/BVAYzy_g3vN/",
62
- "location": null, "attribution": null, "users_in_photo": [], "videos": {"standard_resolution":
63
- {"width": 640, "height": 640, "url": "https://scontent.cdninstagram.com/t50.2886-16/18954088_1445442168855176_8271610702855143424_n.mp4"},
64
- "low_bandwidth": {"width": 480, "height": 480, "url": "https://scontent.cdninstagram.com/t50.2886-16/18928806_320856988345914_4131951279704375296_n.mp4"},
65
- "low_resolution": {"width": 480, "height": 480, "url": "https://scontent.cdninstagram.com/t50.2886-16/18928806_320856988345914_4131951279704375296_n.mp4"}}},
66
- "meta": {"code": 200}}'
67
- http_version:
68
- recorded_at: Wed, 26 Jul 2017 23:54:13 GMT
69
- recorded_with: VCR 2.9.3