package co.phoenixlab.discord.api.entities;

import co.phoenixlab.discord.api.ApiConst;
import co.phoenixlab.discord.api.util.ApiUtils;

import java.net.URL;

public class User {

    /**
     * The User's display name (can change over time)
     */
    private final String username;

    /**
     * The User's unique identifier (does not change)
     */
    private final String id;

    /**
     * The user's avatar ID
     */
    private final String avatar;

    /**
     * The URL where the avatar can be downloaded from
     */
    private final URL avatarUrl;

    public User(String username, String id, String avatar) {
        this.username = username;
        this.id = id;
        this.avatar = avatar;
        this.avatarUrl = ApiUtils.url(String.format(ApiConst.AVATAR_URL_PATTERN, id, avatar));
    }

    public User() {
        this(null, null, null);
    }

    /**
     * @return {@link #username}
     */
    public String getUsername() {
        return username;
    }

    /**
     * @return {@link #id}
     */
    public String getId() {
        return id;
    }

    /**
     * @return {@link #avatar}
     */
    public String getAvatar() {
        return avatar;
    }

    /**
     * @return {@link #avatarUrl}
     */
    public URL getAvatarUrl() {
        return avatarUrl;
    }

    @Override
    public String toString() {
        return String.format("User[username:\"%s\",id:\"%s\",avatar:\"%s\",avatarUrl:\"%s\"]",
                username, id, avatar, avatarUrl.toExternalForm());
    }
}

@@ -309,15 +309,8 @@
 r's 
-unique 
 iden
@@ -332,16 +332,41 @@
 t change
+, not necessarily unqiue?
 )%0A     *
@@ -397,16 +397,162 @@
 ng id;%0A%0A
+    /**%0A     * An identifier used to discriminate between two users with the same name and/or id%0A     */%0A    private final String discriminator;%0A%0A
     /**%0A
@@ -769,16 +769,38 @@
 ring id,
+ String discriminator,
  String 
@@ -861,24 +861,68 @@
 is.id = id;%0A
+        this.discriminator = discriminator;%0A
         this
@@ -1081,24 +1081,30 @@
 (null, null,
+ null,
  null);%0A    
@@ -1310,32 +1310,162 @@
 turn id;%0A    %7D%0A%0A
+    /**%0A     * @return %7B@link #discriminator%7D%0A     */%0A    public String getDiscriminator() %7B%0A        return discriminator;%0A    %7D%0A%0A
     /**%0A     * @

Add discriminator field to User