Player profile API works
[gamestick-pjgsapi.git] / src / Profile.php
index 20327a694d36f179a4f658e221a471d798ee47f6..ca204ac7909fb45fb92192754b322c4643df4803 100644 (file)
@@ -20,4 +20,22 @@ class Profile
     {
         return $this->gamerTag !== null;
     }
+
+    public function getAvatarLargeUrl(): string
+    {
+        if (strpos($this->avatar, '://')) {
+            return $this->avatar;
+        }
+        return 'http://l2.gamestickservices.net/resources/avatars/'
+            . $this->avatar . '.large.jpg';
+    }
+
+    public function getAvatarSmallUrl(): string
+    {
+        if (strpos($this->avatar, '://')) {
+            return $this->avatar;
+        }
+        return 'http://l2.gamestickservices.net/resources/avatars/'
+            . $this->avatar . '.small.jpg';
+    }
 }