Class: NewsmastMastodon::ForYouFeed
- Inherits:
-
Object
- Object
- NewsmastMastodon::ForYouFeed
- Includes:
- Redisable
- Defined in:
- app/models/newsmast_mastodon/for_you_feed.rb
Instance Method Summary collapse
- #get(limit, max_id = nil, since_id = nil, min_id = nil) ⇒ Array<Status>
-
#initialize(account, options = {}) ⇒ ForYouFeed
constructor
A new instance of ForYouFeed.
Constructor Details
#initialize(account, options = {}) ⇒ ForYouFeed
Returns a new instance of ForYouFeed.
12 13 14 15 |
# File 'app/models/newsmast_mastodon/for_you_feed.rb', line 12 def initialize(account, = {}) @account = account @options = end |
Instance Method Details
#get(limit, max_id = nil, since_id = nil, min_id = nil) ⇒ Array<Status>
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'app/models/newsmast_mastodon/for_you_feed.rb', line 22 def get(limit, max_id = nil, since_id = nil, min_id = nil) @status = custom_scope without_reblogs_scope without_replies_scope if exclude_replies? exclude_direct_statuses_scope if exclude_direct_statuses? if grouped_admin_statuses? grouped_admin_statuses_scope grouped_admin_reblogged_statuses_scope end @status.to_a_paginated_by_id(limit, max_id: max_id, since_id: since_id, min_id: min_id) end |