funky 0.2.34 → 0.2.35
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 +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/funky/connections/api.rb +6 -4
- data/lib/funky/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b1607fb71624bd2889cf4e43f7eff129fc7fba21df12822fb6bd1626ecc356a9
|
4
|
+
data.tar.gz: 2a604427138490786c2ffc23608a3c2a05d3175722f2c336eda262aac61dd0e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f7e7f4a7e670c2fd153a2bc25103a7f43965d67d1b5a4b7889861bb506267f9fe8b3069062d28888c49f2cfdfd5cfd7388ecd03b8976919b23ed7ee3f85b27b8
|
7
|
+
data.tar.gz: cb3a1981c479804a7b71074d82ce6002b54ac70dcb76ef8bf17b3a8fe6f45d8d93e033147860b32124bb810385d0024f863cc32831fca6e2157d726912ca0994
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,12 @@ For more information about changelogs, check
|
|
6
6
|
[Keep a Changelog](http://keepachangelog.com) and
|
7
7
|
[Vandamme](http://tech-angels.github.io/vandamme).
|
8
8
|
|
9
|
+
## 0.2.35 - 2019/01/14
|
10
|
+
|
11
|
+
* [ENHANCEMENT] Use 2.10 of Facebook Graph API (upgrade from 2.8).
|
12
|
+
- There will be deprecations in v2.8 of the Facebook Graph API soon. Check out [the changelog](https://developers.facebook.com/docs/apps/changelog).
|
13
|
+
- Funky API is not changed. (Test is still passing)
|
14
|
+
|
9
15
|
## 0.2.34 - 2018/10/19
|
10
16
|
|
11
17
|
* [BUGFIX] Fetch the comment count, with more Facebook videos.
|
@@ -7,8 +7,10 @@ module Funky
|
|
7
7
|
# @api private
|
8
8
|
module Connection
|
9
9
|
class API < Base
|
10
|
+
FB_API_VERSION = 'v2.10'
|
11
|
+
|
10
12
|
def self.fetch_all(path_query)
|
11
|
-
uri = URI "https://#{host}
|
13
|
+
uri = URI "https://#{host}/#{FB_API_VERSION}/#{path_query}&limit=100&access_token=#{app_id}%7C#{app_secret}"
|
12
14
|
fetch_data_with_paging_token(uri)
|
13
15
|
end
|
14
16
|
|
@@ -24,7 +26,7 @@ module Funky
|
|
24
26
|
end
|
25
27
|
|
26
28
|
def self.fetch(path_query, is_array: false)
|
27
|
-
uri = URI "https://#{host}
|
29
|
+
uri = URI "https://#{host}/#{FB_API_VERSION}/#{path_query}&limit=100&access_token=#{app_id}%7C#{app_secret}"
|
28
30
|
is_array ? fetch_multiple_pages(uri).uniq : json_for(uri)
|
29
31
|
rescue URI::InvalidURIError
|
30
32
|
raise Funky::ContentNotFound, "Invalid URL"
|
@@ -65,7 +67,7 @@ module Funky
|
|
65
67
|
|
66
68
|
def self.request(id:, fields:)
|
67
69
|
uri = URI::HTTPS.build host: host,
|
68
|
-
path: "
|
70
|
+
path: "/#{FB_API_VERSION}/#{id}",
|
69
71
|
query: "access_token=#{app_id}%7C#{app_secret}&fields=#{fields}"
|
70
72
|
response_for(get_http_request(uri), uri)
|
71
73
|
end
|
@@ -100,7 +102,7 @@ module Funky
|
|
100
102
|
|
101
103
|
def self.create_batch_for(ids, fields)
|
102
104
|
ids.map do |id|
|
103
|
-
{"method":"GET", "relative_url": "
|
105
|
+
{"method":"GET", "relative_url": "/#{FB_API_VERSION}/#{id}?fields=#{fields}"}
|
104
106
|
end
|
105
107
|
end
|
106
108
|
end
|
data/lib/funky/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: funky
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.35
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Philip Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-01-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|