From a283ba724785d537c56ce3967dd0f1b2fe489290 Mon Sep 17 00:00:00 2001 From: bytedream Date: Thu, 23 Jun 2022 14:27:15 +0200 Subject: [PATCH] Add functions to get wallpaper urls --- wallpaper.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/wallpaper.go b/wallpaper.go index f64cedf..da7a032 100644 --- a/wallpaper.go +++ b/wallpaper.go @@ -1,4 +1,14 @@ package crunchyroll +import "fmt" + // Wallpaper contains a wallpaper name which can be set via Account.ChangeWallpaper. type Wallpaper string + +func (w *Wallpaper) TinyUrl() string { + return fmt.Sprintf("https://static.crunchyroll.com/assets/wallpaper/360x115/%s", *w) +} + +func (w *Wallpaper) BigUrl() string { + return fmt.Sprintf("https://static.crunchyroll.com/assets/wallpaper/1920x400/%s", *w) +}