insta 0.1.2 → 0.2.0

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
  SHA256:
3
- metadata.gz: 3c8ab17f4d067b83c946ed962cd0bf02935c8af25dd85ac673020f2401fa3247
4
- data.tar.gz: 9d592b91e64bf5af24f8420bbd460ddb7d8527eeb8ad5a8909ef0445f1c31082
3
+ metadata.gz: cb0902f06fda365ec8d0840171b83223d93bfe159ff0412930ca024e2cbfa540
4
+ data.tar.gz: 7deb412d4ef0dd34b866812fc9f88f73ba02267392d37e7231f0d3abda01c4ce
5
5
  SHA512:
6
- metadata.gz: be1e3f44753538d6885951b797d0fa7fe7c8833d802cddabb7bceadd04798f5f610ca97027f618c80c388cb32c08f8289c86a0fb1f91e1317487370a925842bf
7
- data.tar.gz: 0f3406e2afacf022671bc26056f7fda6229d875290bc61d9a9a20f2e5684b370d38d5a6393cfb648b718378303a290b55b7527f0c8b9e89012e952abc2c068a6
6
+ metadata.gz: 587d32f2e1b6b4ccde90f21bfaadec33060456ddf8ee88e31b5aea302bc91e19c5a08a1d98a473eb1906a84b8042723274f26fe67a37dbbaaf53f813d677826c
7
+ data.tar.gz: 2f9ca51871d3d99de02b9f348bdd4862dcd402808195e28fb4347b51f87ce461ba307f0a9fe96d122b56686f34e28b7c4e819e4cff2b625166fa4552ad8b7acb
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- insta (0.1.2)
4
+ insta (0.2.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/lib/insta/feed.rb CHANGED
@@ -15,6 +15,18 @@ module Insta
15
15
  JSON.parse result.body
16
16
  end
17
17
 
18
+ def self.user_media_graphql(user, data)
19
+ user_id = (!data[:id].nil? ? data[:id] : user.data[:id])
20
+ endpoint = "https://www.instagram.com/graphql/query/?query_id=17880160963012870&id=#{user_id}&first=80&after="
21
+ result = Insta::API.http(
22
+ url: endpoint,
23
+ method: 'GET',
24
+ user: user
25
+ )
26
+
27
+ JSON.parse result.body
28
+ end
29
+
18
30
  def self.user_followers(user, data, limit)
19
31
  has_next_page = true
20
32
  followers = []
data/lib/insta/user.rb CHANGED
@@ -35,6 +35,10 @@ module Insta
35
35
  Insta::Feed.user_media(self, data)
36
36
  end
37
37
 
38
+ def user_media_graphql(data = {})
39
+ Insta::Feed.user_media_graphql(self, data)
40
+ end
41
+
38
42
  def user_followers(limit = Float::INFINITY, data = {})
39
43
  Insta::Feed.user_followers(self, data, limit)
40
44
  end
data/lib/insta/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Insta
2
- VERSION = '0.1.2'.freeze
2
+ VERSION = '0.2.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: insta
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Renan Garcia
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-02-10 00:00:00.000000000 Z
11
+ date: 2018-02-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler