Move AboutRelatedChannel to channels/about.cr

This commit is contained in:
syeopite 2021-07-11 02:31:47 -07:00
parent 01e837d526
commit 7dfcec3307
No known key found for this signature in database
GPG Key ID: 6FA616E5A5294A82
2 changed files with 9 additions and 9 deletions

View File

@ -21,6 +21,15 @@ struct AboutChannel
property links : Array(Tuple(String, String, String))
end
struct AboutRelatedChannel
include DB::Serializable
property ucid : String
property author : String
property author_url : String
property author_thumbnail : String
end
def get_about_info(ucid, locale)
result = YT_POOL.client &.get("/channel/#{ucid}/about?gl=US&hl=en")
if result.status_code != 200

View File

@ -107,15 +107,6 @@ struct ChannelVideo
end
end
struct AboutRelatedChannel
include DB::Serializable
property ucid : String
property author : String
property author_url : String
property author_thumbnail : String
end
class ChannelRedirect < Exception
property channel_id : String