instagram_graph_api 0.0.9 → 0.0.10
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: edf6e14621325335006372e2dc528258578999f3effd5a2c298f3742dab246ba
|
|
4
|
+
data.tar.gz: 6d20e67929d8899e3bfb99a3af7a60737f72ef07b2049a52c9b59b9ba8df00b8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0ce67f9ed15721af55c677d2d93ad00eb589a22597a8d5c34aa77a480458ab7ae3df6f32829a79fea3847d898d6c4e47c6a8fcf6eea075d17920e58ce9422375
|
|
7
|
+
data.tar.gz: 9756deddc2671b2af5dc75f4009d184c020397852fbd0dd00ef179fef1c2c4a38acbd66d92ed6fb739a076e7ac82efa2d261e6feb9804199094715ad8e95408e
|
|
@@ -18,15 +18,16 @@ module InstagramGraphApi
|
|
|
18
18
|
"timestamp,thumbnail_url"
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
def get_user_recent_media(id, type: "image", options: {})
|
|
21
|
+
def get_user_recent_media(id, fields = nil, type: "image", options: {})
|
|
22
22
|
entity = type.eql?("story") ? "stories" : "media"
|
|
23
|
-
|
|
23
|
+
fields ||= MEDIA_INFO_HASH[type.to_sym]
|
|
24
|
+
query = "#{entity}?fields=#{fields}"
|
|
24
25
|
query += "&after=#{options[:after]}" if options[:after]
|
|
25
26
|
query += "&before=#{options[:before]}" if options[:before]
|
|
26
27
|
get_connections(id, query)
|
|
27
28
|
end
|
|
28
29
|
|
|
29
|
-
def get_media_details(media_id, type: "image")
|
|
30
|
+
def get_media_details(media_id, fields = nil, type: "image")
|
|
30
31
|
fields ||= MEDIA_INFO_HASH[type.to_sym]
|
|
31
32
|
get_connections(media_id , "?fields=#{fields}")
|
|
32
33
|
end
|
|
@@ -9,6 +9,14 @@ module InstagramGraphApi
|
|
|
9
9
|
end.compact
|
|
10
10
|
end
|
|
11
11
|
|
|
12
|
+
def connected_ig_accounts(fields = nil)
|
|
13
|
+
fields ||= 'id,name,biography,ig_id,followers_count,profile_picture_url,username'
|
|
14
|
+
accounts = get_pages("?fields=connected_instagram_account{#{fields}}")
|
|
15
|
+
accounts.map do |a|
|
|
16
|
+
a["connected_instagram_account"].merge(page_id: a["id"]) if a["connected_instagram_account"]
|
|
17
|
+
end.compact
|
|
18
|
+
end
|
|
19
|
+
|
|
12
20
|
def get_account_info(ig_account_id, fields = nil)
|
|
13
21
|
fields ||= "biography,followers_count,ig_id,name,profile_picture_url,username,id"
|
|
14
22
|
get_connections(ig_account_id , "?fields=#{fields}")
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: instagram_graph_api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.10
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Rakesh
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-
|
|
11
|
+
date: 2019-03-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|