instagram_feed_by_hashtag 0.1.1 → 0.1.3

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: afbdfc2a46ce3d6b5dd3a089c4320241ac3cc808
4
- data.tar.gz: 7a4f2d443c0cc2974e95eb87e0fe9ff2e303dd35
3
+ metadata.gz: a80db331a45eda63f6a644911a56a4a03f432bb9
4
+ data.tar.gz: dc0256e2af5e9d9947f91394a7126ee6fe751671
5
5
  SHA512:
6
- metadata.gz: 7599a9fbe628fe79d67a39c2ded9c8b39604cfea4d5080ff076354c7b9274484469bc74e3daedef6a7f197fdbd4f318afc7135e3c307a4b9bd7d93a6b2121737
7
- data.tar.gz: 10ac0e508e05beecdc840432e6e1027fe2fe5fc6335894fe834d48b64c850db0c9f09dad2606e567782ebb11a49522eaf6712e4c7ca1204dbffff301d13c0419
6
+ metadata.gz: 3966391a3359d50a7f195a4f1820dcf7deae5a3e3054e7e37a2776d28d1cdd76277e993768e685832616f1c1fa06f57b67442a499f26a0cf8080339aa6a28b55
7
+ data.tar.gz: 561651c75b97d6a3e0ebd110c8b2727b3ec028ed990b2fd52f107a25d9d1321262d11e61146149e6360749f376fb25fdefd3be3b2b7822ce1ccded8337c2469e
data/README.md CHANGED
@@ -21,16 +21,25 @@ Or install it yourself as:
21
21
  ## Usage
22
22
 
23
23
 
24
- Usage: Instagramfeedbyhashtag.feed(hashtag, count) # hashtag => string; count => integer.
24
+ Usage: InstagramFeedByHashtag.feed(hashtag, count) # hashtag => string; count => integer.
25
25
 
26
- Example: Instagramfeedbyhashtag.feed('cars', 6) # Returns an JSON with 6 latest pics tagged with 'cars'.
26
+ Example: InstagramFeedByHashtag.feed('cars', 6) # Returns an JSON with 6 latest pics tagged with 'cars'.
27
27
 
28
- Full example: feed = Instagramfeedbyhashtag.feed( 'cars', 6 ) # Make request and store JSON in feed variable
28
+ Full example: feed = InstagramFeedByHashtag.feed( 'cars', 6 ) # Make request and store JSON in feed variable
29
29
  @images = [] # Define array
30
30
  for i in 0..(feed.count - 1) # Loop through feed
31
31
  @images << feed[i]['display_src'] unless feed[i].nil? # Grab images URLs and store them in @images
32
32
  end
33
33
 
34
+ In this JSON, you can find: ['display_src']
35
+ ['code']
36
+ ['owner']['id']
37
+ ['caption']
38
+ ['likes']
39
+ ['thumbnail_src']
40
+
41
+
42
+
34
43
  ## Contributing
35
44
 
36
45
  Bug reports and pull requests are welcome on GitHub at https://github.com/eduardoprauze/instagram_feed_by_hashtag.
@@ -2,7 +2,7 @@ require "instagram_feed_by_hashtag/version"
2
2
 
3
3
  module InstagramFeedByHashtag
4
4
 
5
- def feed(hashtag, how_many)
5
+ def self.feed(hashtag, how_many)
6
6
  require 'net/http'
7
7
  url_raw = 'https://www.instagram.com/explore/tags/'+ hashtag +'/?__a=1'
8
8
  url = URI.parse("#{url_raw}")
@@ -22,3 +22,4 @@ module InstagramFeedByHashtag
22
22
  end
23
23
 
24
24
  end
25
+
@@ -1,3 +1,3 @@
1
1
  module InstagramFeedByHashtag
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.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.1.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eduardo Prauze