funky 0.2.34 → 0.2.35

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
  SHA256:
3
- metadata.gz: 5f5830bfe11cfc37703ba016ba069a5b006bc708cc3c720ad66cc2213567ebf8
4
- data.tar.gz: 947951106b4a4db2c5bf288daeca139dfe3564400ee9869d1141153e9a35ae16
3
+ metadata.gz: b1607fb71624bd2889cf4e43f7eff129fc7fba21df12822fb6bd1626ecc356a9
4
+ data.tar.gz: 2a604427138490786c2ffc23608a3c2a05d3175722f2c336eda262aac61dd0e4
5
5
  SHA512:
6
- metadata.gz: dd1790214eb8a18cf2643a9e77cc6f048e448b1ecca38f30db993c201bb326b8424b67d1da0fad5f76160da8180d033ba510dc36fdf08ec1b136f9cec2114d5e
7
- data.tar.gz: 0a8ba8cd79110a54bf4dcd4142cb3951ec19752dcd332c98dc0cc3ca103c4ff1d6dfa1498d74e526d3367b3b38066652eb482f82977a46941c974069d15ed102
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}/v2.9/#{path_query}&limit=100&access_token=#{app_id}%7C#{app_secret}"
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}/v2.8/#{path_query}&limit=100&access_token=#{app_id}%7C#{app_secret}"
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: "/v2.8/#{id}",
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": "/v2.8/#{id}?fields=#{fields}"}
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
@@ -1,3 +1,3 @@
1
1
  module Funky
2
- VERSION = "0.2.34"
2
+ VERSION = "0.2.35"
3
3
  end
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.34
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: 2018-10-19 00:00:00.000000000 Z
11
+ date: 2019-01-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler