funky 0.2.27 → 0.2.28

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: efc2445492ec5eb3d1a0d183342d991e4c3d13d8
4
- data.tar.gz: b48084ac4af2a32ab52799a9685e6aaa54a14723
3
+ metadata.gz: 0cbcbb6a6a6922632be99fc94047038799d24b94
4
+ data.tar.gz: ed36268b042b5c17e200c19a35048e1088ddd1fd
5
5
  SHA512:
6
- metadata.gz: c5f690f47ebbae2ecd4a7edb399a8f7897a2597a907743e4bc33c5f4caef4034bf6f95cca2c407d820e70d4bdd5fe8f308b8824efd9ab45370082dc1ad2bd17e
7
- data.tar.gz: 6214c4089cd6751abd8e2dd1abab8fca84f715f6ade266e14b31870d64f6fbf25899d6e298ddd2cd30817f9f5977c0504cef90643ad267d180dddaa5d7ca9806
6
+ metadata.gz: 84d9c87737ee60d5589a6167964496280e1656d5c5364723b6ca55374ee3b3322fc2ed38203711ab62f7861180a07eb5f78342c0f1783e6b07d10f41ac769fda
7
+ data.tar.gz: 30d23371ec8b9e6a0caa32cfdcdd8d9351f7707e3795876c2b4f24dd5b54309d01b160154bce0ffb0766894de6a6d572569c09ef3ccaa472fca000ebfc29c035
data/.travis.yml CHANGED
@@ -8,4 +8,4 @@ script: bundle exec rspec spec
8
8
  # https://github.com/travis-ci/travis-ci/issues/1946
9
9
  env:
10
10
  global:
11
- secure: Ru7XMnp+0D3tqXJJKRivQHA/e76dhUS4zv9SAvcyzTeuELtn41PQ07r53lunz2t6btXuyRy5Cyr9DD7CnP+ocXbe7Ce6pl5i5gZ7R5KIeWgxZLtKQ5xNs39Yb1jP7RqpgwQFfM86ByQ65zVBKYIRXmDdVfJoG6GM+TeXz6gi3AHwkRmvzSuS5KQ/61GZ8gr6sD55aR1x/YNBsubR7VmKFOmRGAt8XcUND+ArHiDe4mBolKF8d+jYI7a5csDT6ewD5RyT5HOgi0mKobCntvnLQJ4OnCzLjZfihfaw/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vnc=
data/CHANGELOG.md CHANGED
@@ -6,6 +6,11 @@ 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.28 - 2017/10/05
10
+
11
+ * [FEATURE] Add `since` option when it calls Page#videos and Page#posts to reduce
12
+ amount of requests when it gets only recent items.
13
+
9
14
  ## 0.2.27 - 2017/08/28
10
15
 
11
16
  * [BUGFIX] Fetch the correct view count even for non-English pages
data/lib/funky/page.rb CHANGED
@@ -29,10 +29,10 @@ module Funky
29
29
  #
30
30
  # @return [Array<Funky::Video>] multiple Funky::Video objects containing data
31
31
  # fetched by Facebook Graph API.
32
- def videos
33
- videos = Funky::Connection::API.fetch(
34
- "#{id}/videos?fields=id,title,description,created_time,length,comments.limit(0).summary(true),likes.limit(0).summary(true),reactions.limit(0).summary(true)",
35
- is_array: true)
32
+ def videos(options = {})
33
+ path_query = "#{id}/videos?fields=id,title,description,created_time,length,comments.limit(0).summary(true),likes.limit(0).summary(true),reactions.limit(0).summary(true)"
34
+ path_query << "&since=#{options[:since]}" if options[:since]
35
+ videos = Funky::Connection::API.fetch_all(path_query)
36
36
  videos.map {|video| Video.new(video) }
37
37
  end
38
38
 
@@ -46,8 +46,10 @@ module Funky
46
46
  #
47
47
  # @return [Array<Funky::Post>] multiple Funky::Post objects containing data
48
48
  # fetched by Facebook Graph API.
49
- def posts
50
- posts = Funky::Connection::API.fetch_all("#{id}/posts?fields=type,created_time")
49
+ def posts(options = {})
50
+ path_query = "#{id}/posts?fields=type,created_time"
51
+ path_query << "&since=#{options[:since]}" if options[:since]
52
+ posts = Funky::Connection::API.fetch_all(path_query)
51
53
  posts.map {|post| Post.new(post)}
52
54
  end
53
55
 
data/lib/funky/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Funky
2
- VERSION = "0.2.27"
2
+ VERSION = "0.2.28"
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.27
4
+ version: 0.2.28
5
5
  platform: ruby
6
6
  authors:
7
7
  - Philip Nguyen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-08-29 00:00:00.000000000 Z
11
+ date: 2017-10-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -149,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
149
149
  version: '0'
150
150
  requirements: []
151
151
  rubyforge_project:
152
- rubygems_version: 2.6.11
152
+ rubygems_version: 2.6.13
153
153
  signing_key:
154
154
  specification_version: 4
155
155
  summary: Funky is a Ruby library to fetch video data.