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 +4 -4
- data/lib/instagram/client/tags.rb +6 -0
- data/lib/instagram/version.rb +1 -1
- data/spec/instagram/client/tags_spec.rb +25 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4afb2034ccc419841ab6e4ff22a4db8b38f14ee1
|
4
|
+
data.tar.gz: 034b984f646959f79290d9b4991a50e73a293272
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/lib/instagram/version.rb
CHANGED
@@ -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.
|
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-
|
12
|
+
date: 2017-03-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|