module Freefeed::V2::Timelines

Public Instance Methods

best_of() click to toggle source
# File lib/freefeed/v2/timelines.rb, line 10
def best_of
  authenticated_request(:get, "/v2/bestof")
end
comments_timeline(username, offset: 0) click to toggle source
# File lib/freefeed/v2/timelines.rb, line 26
def comments_timeline(username, offset: 0)
  request_timeline("#{username}/comments", offset)
end
everything() click to toggle source
# File lib/freefeed/v2/timelines.rb, line 14
def everything
  request(:get, "/v2/everything")
end
likes_timeline(username, offset: 0) click to toggle source
# File lib/freefeed/v2/timelines.rb, line 30
def likes_timeline(username, offset: 0)
  request_timeline("#{username}/likes", offset)
end
own_timeline(filter: nil, offset: 0) click to toggle source
# File lib/freefeed/v2/timelines.rb, line 18
def own_timeline(filter: nil, offset: 0)
  request_timeline(filter ? "filter/#{filter}" : "home", offset)
end
timeline(username, offset: 0) click to toggle source
# File lib/freefeed/v2/timelines.rb, line 22
def timeline(username, offset: 0)
  request_timeline(username, offset)
end

Private Instance Methods

request_timeline(path, offset) click to toggle source
# File lib/freefeed/v2/timelines.rb, line 36
def request_timeline(path, offset)
  params = offset.positive? ? { json: { offset: offset } } : {}
  authenticated_request(:get, "/v2/timelines/#{path}", params)
end