instagram_feed_by_hashtag 0.0.2 → 0.0.3

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: fcc19cab6d5302e4c1727ae94414bdf01a39e5c2
4
- data.tar.gz: 50518da58a72cdc4bbb2e046e267133f5e621ee8
3
+ metadata.gz: 099ab3f58f8f33426075889309b14ff5edbf2b44
4
+ data.tar.gz: 634d5caaaae8c2c0df9c5b2b36d713061f70b037
5
5
  SHA512:
6
- metadata.gz: 901d26652a0889678d93e41f8f2a87d31cea8479cf909ef86c2ae036f563b9aca2303da527888480ab563bb48dcac3ec23de574172a878da642da24ab4fda30d
7
- data.tar.gz: 648ac8c7442360b4d5dfc3502860e952a6095fdd06e05e236a8c57be5e68f32359a49c9ac6b792ebd9e2c672da6d27a49cfc558acaa179a6291a88bf2fe26f03
6
+ metadata.gz: f91ca2d0315e64c981d68afb458cd6fbf4e1f784ceb265ed1765f162a218fff95f83ab2793541f7b337618fd6fdd036d960f1f7b9f64d5b02a0880ed040598ff
7
+ data.tar.gz: b6aec60cf1169e5cc6ce37196552f791f001d88c0470a5c17c1f27e2667a6509cf251eafec548cbafbaae7bc28e1a9f6f87151cbb0e0cac4fa571bcda52712e1
@@ -21,7 +21,6 @@ module InstagramFeedByHashtag
21
21
  end
22
22
  end
23
23
  result
24
- p 'finalizou o result'
25
24
  end
26
25
 
27
26
 
@@ -32,23 +31,19 @@ module Instagramfeedbyhashtag
32
31
  def self.feed(hashtag, count)
33
32
  require 'net/http'
34
33
  url = URI.parse("https://www.instagram.com/query/?q=ig_hashtag%28#{hashtag}%29+%7B+media.first%28#{count}%29+%7B+count%2C+nodes+%7B+caption%2C+code%2C+comments+%7B+count+%7D%2C+date%2C+display_src%2C+id%2C+is_video%2C+likes+%7B+count+%7D%2C+owner+%7B+id%2C+username%2C+full_name%2C+profile_pic_url+%7D%2C+thumbnail_src%2C+video_views%2C+video_url+%7D%2C+page_info+%7D+%7D")
35
- p 'foi o http'
36
34
  begin
37
35
  resp = Net::HTTP.get(url)
38
36
  rescue Errno::ETIMEDOUT, Errno::EINVAL, Errno::ECONNRESET, EOFError, Net::HTTPBadResponse => e
39
37
  resp = false
40
38
  end
41
39
  unless resp == false
42
- p 'vai dar o parse'
43
40
  result = []
44
41
  parsed_json = JSON.parse(resp)
45
- p parsed_json
46
- for i in 1..6
42
+ for i in 1..count
47
43
  result << parsed_json['media']['nodes'][i]
48
44
  end
49
45
  end
50
46
  result
51
- p 'finalizou o result'
52
47
  end
53
48
 
54
49
 
@@ -1,3 +1,3 @@
1
1
  module InstagramFeedByHashtag
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: instagram_feed_by_hashtag
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eduardo Prauze