social_net 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f98753cdb78bc43e646f22a215b0b2dcdb638630
4
- data.tar.gz: bce5fe766ad93f60dc36d4657aa521c397007e3e
3
+ metadata.gz: ec838ad570a00f54e721234700fe4904d96c2aa6
4
+ data.tar.gz: b1fb9ba571da10b71cb32c60a4913ec8e62ccae6
5
5
  SHA512:
6
- metadata.gz: f1e583a86fd6e9233169107eaa05e30a865ba148a1a2787030e6dc3a0ec5d4f86dc03221dc0a35d11cba044de0ce53ad29182b48d526088a4938175c53412e5e
7
- data.tar.gz: d83f3ece9d7c1c546404d2f8c945e6b09c57709eca1984a9d6825b7f1ec82cd1f48716e36e46ed050254b93dde354ead27f2d7a146bdaf4acded2157fc8dab43
6
+ metadata.gz: c6aa6f702c2ebd840c1f6a057a064a54a43ab34419f16d54ae2a798521dcb7b490701ae060a8487830597a58cec162e74ca31bb007c53a3a8414d543f3ad75d5
7
+ data.tar.gz: 934f9fb405eef8d90f303754c010b29b7a5576bb60b9d528d4473b6a6038ac88dea5a5de611a02ee36f9ab2ffedce9c2c7faa292b8650b722e28c88fe3fc48ac
data/CHANGELOG.md CHANGED
@@ -13,3 +13,7 @@ For more information about changelogs, check
13
13
  ## 0.2.1 - 2017-3-14
14
14
 
15
15
  * [FEATURE] Add `.posts` to instance of `Instagram::User`.
16
+
17
+ ## 0.2.2 - 2017-3-14
18
+
19
+ * [IMPROVEMENT] Rename `.posts` to `.videos`.
data/README.md CHANGED
@@ -18,7 +18,7 @@ After [configuring your Instagram app](#configuring-your-instagram-app), you can
18
18
  user = SocialNet::Instagram::User.find_by username: 'Collab'
19
19
  user.username #=> "Collab"
20
20
  user.follower_count #=> 7025
21
- user.posts #=>
21
+ user.videos #=>
22
22
  # [SocialNet::Instagram::Models::Video
23
23
  # @caption='Diet starts Monday... 😂🍩',
24
24
  # @file='https://scontent.cdninstagram.com/t50.2886-16/17192719_791273527696774_5253726776697290752_n.mp4',
@@ -81,7 +81,7 @@ Use [SocialNet::Instagram::User]() to:
81
81
  * retrieve an Instagram user by username
82
82
  * retrieve an Instagram user by id
83
83
  * access the number of followers of an Instagram user
84
- * retrieve recent posts of an Instagram user
84
+ * retrieve recent videos of an Instagram user
85
85
 
86
86
  ```ruby
87
87
  user = SocialNet::Instagram::User.find_by username: 'collab'
@@ -90,7 +90,7 @@ user.follower_count #=> 24198
90
90
  user = SocialNet::Instagram::User.find_by id: 270587948
91
91
  user.follower_count #=> 24198
92
92
 
93
- user.posts #=>
93
+ user.videos #=>
94
94
  # [SocialNet::Instagram::Models::Video
95
95
  # @caption='Diet starts Monday... 😂🍩',
96
96
  # @file='https://scontent.cdninstagram.com/t50.2886-16/17192719_791273527696774_5253726776697290752_n.mp4',
@@ -13,10 +13,10 @@ module SocialNet
13
13
  @follower_count = attrs['counts']['followed_by']
14
14
  end
15
15
 
16
- # Returns the existing Instagram user's posts
16
+ # Returns the existing Instagram user's most recent videos
17
17
  #
18
- # @return [SocialNet::Instagram::Models::Video] when the posts are found.
19
- def posts
18
+ # @return [SocialNet::Instagram::Models::Video] when the videos are found.
19
+ def videos
20
20
  request = Api::Request.new endpoint: "users/#{id}/media/recent"
21
21
  videos = request.run.select {|p| p['type'] == 'video'}
22
22
  videos.map {|r| SocialNet::Instagram::Video.new r }
@@ -1,3 +1,3 @@
1
1
  module SocialNet
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
@@ -49,14 +49,14 @@ describe SocialNet::Instagram::User, :vcr do
49
49
  end
50
50
  end
51
51
 
52
- describe '.posts' do
52
+ describe '.videos' do
53
53
  subject(:user) { SocialNet::Instagram::User.find_by! username: username }
54
54
  context 'given an existing user' do
55
55
  let(:username) { existing_username }
56
56
 
57
- it 'returns an array of posts from the user' do
58
- expect(user.posts).to be_an Array
59
- expect(user.posts.first).to be_an_instance_of SocialNet::Instagram::Video
57
+ it 'returns an array of video posts from the user' do
58
+ expect(user.videos).to be_an Array
59
+ expect(user.videos.first).to be_an_instance_of SocialNet::Instagram::Video
60
60
  end
61
61
  end
62
62
  end