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 +4 -4
- data/.travis.yml +1 -1
- data/CHANGELOG.md +5 -0
- data/lib/funky/page.rb +8 -6
- data/lib/funky/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0cbcbb6a6a6922632be99fc94047038799d24b94
|
4
|
+
data.tar.gz: ed36268b042b5c17e200c19a35048e1088ddd1fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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:
|
11
|
+
secure: KJhOU1PDt3t0x7m9TouRNkLOvmFBLnttODjp7yyJxiG0D2qAJQ6Calhc7X9a7Pi4e0YFsR3zUY905G11q/9lMafeu2k2EeSp6ZJCT3dmprsj08REwP6Uox1xO9Hy0gFWMHjm0apbNZzanJsW7obbjWiKdU73B8XjpBTFnpeshFPIJKiTNKBkLGdkZkQlYqI2ZMXjIPDHahPjY8u4lPfchbR6+DtxZAX05PRa5y/NUknxOndMkV60fHLO4bWEm3Cp1S0ggSKysDm/Z2r3mARy/1i1DmUkX+MAFaxKk88n++Fzw0rnb0vdIE9yyo6LtaFRHzEHnuNb7tLQf0F6qhx0jSEqC9oEm600dMkY3TZeJqB2v/bScpe5uThiMDCNABJcmKx4vi/sJp/PHxRDuG+prdhWpMItVrv/mhpwyGIUyNN5/rzAqMLyhpwz3lTV4ePaNw85++/tLB7UTqWXELlzdNE105OZE0ZRr4M36bT6HoTg+mb0DguULiYFIkz5SWK+v2eKKwgw6zI4/xSvRodH8tPhJH1QvAuseVYm07HGHshCq9uq9FLpc2ThqA/goNAknPp4Xe9097e+BrMqPYoG/S4vsigJ6ByyqZRRAIvxULEPX+SYaDtoziZ+zQM5PQgteEJG7UwKBoI0YE9GKAvQTybnG2T004Tx92SP8Ejcvnc=
|
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
|
-
|
34
|
-
|
35
|
-
|
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
|
-
|
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
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.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-
|
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.
|
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.
|