-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add since option to Page#posts and Page#videos #92
Conversation
lib/funky/page.rb
Outdated
def videos(options = {}) | ||
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)" | ||
path_query << "&since=#{options[:since]}" if options[:since] | ||
videos = Funky::Connection::API.fetch_all(path_query) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kangkyu The is_array: true
part is missing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used fetch_all
instead of fetch
method for token-based pagination. I thought time-based pagination (fetch
with is_array: true
) can be hard to work with since or until parameter
@@ -46,8 +46,10 @@ def videos | |||
# | |||
# @return [Array<Funky::Post>] multiple Funky::Post objects containing data | |||
# fetched by Facebook Graph API. | |||
def posts | |||
posts = Funky::Connection::API.fetch_all("#{id}/posts?fields=type,created_time") | |||
def posts(options = {}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kangkyu Tests are missing
closing in favor of #95 |
No description provided.