extendi-instagram 2.0.0 → 2.0.1

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: 3db85613f140026a6aaba37c175af937cb999a56
4
- data.tar.gz: d1317eaf31ae2b978c46d68aa10a63dea7d04367
3
+ metadata.gz: 4afb2034ccc419841ab6e4ff22a4db8b38f14ee1
4
+ data.tar.gz: 034b984f646959f79290d9b4991a50e73a293272
5
5
  SHA512:
6
- metadata.gz: 85feeae6d732239bc73f0b6a7cf78a282583dacf7f1f8314cc1cfc0c6463d6bfa02a0ed35c71d939dac6c6cc0efdb17ddaba098274c8d259755e208df3595c46
7
- data.tar.gz: fec0a6576908f04c02a3685a911416a8e2e6c867d542136bce1c8291c73726d2a6dd6348c1a5db0a8247fc4037f5ab1180de49a1adfd3f60d3b658666f448518
6
+ metadata.gz: da876ed6127aa5544c6d18c6a31642a2efd9857c9526666a43eb5ba941f13c17b4f5dd7f9e1775c5a8870aa0caa5c32758b8529d0aec7e3db79bce687e79c029
7
+ data.tar.gz: bfca624aee972db0dbc9d9fbd4b9b83956bd7611f7b65e35021737cb7c9cb05d95d3411e442a0b1138e27de543528e40cd49327ae888df7af6414f9a83b0e3be
@@ -38,6 +38,12 @@ module Instagram
38
38
  response
39
39
  end
40
40
 
41
+ def tag_recent_media_page(id, *args)
42
+ options = args.last.is_a?(Hash) ? args.pop : {}
43
+ response = get("tags/#{id}/media/recent", options, false, true, false)
44
+ JSON.parse(response.body)
45
+ end
46
+
41
47
  # Returns a list of tags starting with the given search query
42
48
  #
43
49
  # @format :json
@@ -1,3 +1,3 @@
1
1
  module Instagram
2
- VERSION = '2.0.0'.freeze unless defined?(::Instagram::VERSION)
2
+ VERSION = '2.0.1'.freeze unless defined?(::Instagram::VERSION)
3
3
  end
@@ -51,6 +51,31 @@ describe Instagram::Client do
51
51
 
52
52
  end
53
53
 
54
+ describe ".tag_recent_media_page" do
55
+
56
+ before do
57
+ stub_get("tags/cat/media/recent.#{format}").
58
+ with(:query => {:access_token => @client.access_token}).
59
+ to_return(:body => fixture("tag_recent_media.#{format}"), :headers => {:content_type => "application/#{format}; charset=utf-8"})
60
+ end
61
+
62
+ it "should get the correct resource" do
63
+ @client.tag_recent_media('cat')
64
+ expect(a_get("tags/cat/media/recent.#{format}").
65
+ with(:query => {:access_token => @client.access_token})).
66
+ to have_been_made
67
+ end
68
+
69
+ it "should return the raw of media" do
70
+ raw = @client.tag_recent_media_page('cat')
71
+ media = raw['data']
72
+ expect(raw['pagination']).to_not be nil
73
+ expect(media).to be_a Array
74
+ expect(media.first['user']['username']).to eq("amandavan")
75
+ end
76
+
77
+ end
78
+
54
79
  describe ".tag_search" do
55
80
 
56
81
  before do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: extendi-instagram
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shayne Sweeney
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-03-17 00:00:00.000000000 Z
12
+ date: 2017-03-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake