Extractors: Add module for 'hashtagTileRenderer'

This commit is contained in:
Samantaz Fox
2023-07-15 15:41:04 +02:00
parent c8ecfaabe1
commit 839e90aeff
2 changed files with 72 additions and 2 deletions

View File

@@ -232,6 +232,25 @@ struct SearchChannel
end
end
struct SearchHashtag
include DB::Serializable
property title : String
property url : String
property video_count : Int64
property channel_count : Int64
def to_json(locale : String?, json : JSON::Builder)
json.object do
json.field "type", "hashtag"
json.field "title", self.title
json.field "url", self.url
json.field "videoCount", self.video_count
json.field "channelCount", self.channel_count
end
end
end
class Category
include DB::Serializable
@@ -274,4 +293,4 @@ struct Continuation
end
end
alias SearchItem = SearchVideo | SearchChannel | SearchPlaylist | Category
alias SearchItem = SearchVideo | SearchChannel | SearchPlaylist | SearchHashtag | Category