struct

Feed

Inherits JSON::Serializable < Struct < Value < Object

Constructors

new(id : Int64, url : String, title : Nil | String, description : Nil | String, image_url : Nil | String, last_fetched_at : Time | Nil, etag : Nil | String, last_modified : Nil | String, ttl_minutes : Int32 | Nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source
upsert(url : String, title : String | Nil, description : String | Nil, image_url : String | Nil) : Feed
Source

Class methods

due_for_refresh
Source
find(id : Int64) : Feed | Nil
Source
find_many(ids : Array(Int64)) : Hash(Int64, Feed)

Batched analogue of find — one round-trip for N feeds. Returns a {id => Feed} map; missing ids are simply absent (mirrors find returning nil). Empty input short-circuits to an empty map.

Source
for_user(user_id : Int64) : Array(Feed)
Source
subscribe(user_id : Int64, feed_id : Int64)
Source
subscribed?(user_id : Int64, feed_id : Int64) : Bool
Source
unsubscribe(user_id : Int64, feed_id : Int64)
Source
update_refresh_metadata(id : Int64, etag : String | Nil, last_modified : String | Nil, ttl_minutes : Int32 | Nil)
Source

Instance methods

description
Source
description=(description : String | Nil)
Source
etag
Source
etag=(etag : String | Nil)
Source
id=(id : Int64)
Source
image_url
Source
image_url=(image_url : String | Nil)
Source
last_fetched_at
Source
last_fetched_at=(last_fetched_at : Time | Nil)
Source
last_modified
Source
last_modified=(last_modified : String | Nil)
Source
title
Source
title=(title : String | Nil)
Source
ttl_minutes
Source
ttl_minutes=(ttl_minutes : Int32 | Nil)
Source
url=(url : String)
Source