package me.arimelody.aridroid;

import org.json.JSONException;
import org.json.JSONObject;

public class ArtistModel {
    private final String id;
    private final String name;
    private final String website;
    private final String avatarURL;

    public ArtistModel(String id, String name, String website, String avatarURL) {
        this.id = id;
        this.name = name;
        this.website = website;
        this.avatarURL = avatarURL;
    }

    public ArtistModel(JSONObject json) {
        this.id = json.optString("id");
        this.name = json.optString("name");
        this.website = json.optString("website");
        this.avatarURL = json.optString("avatar");
    }

    public String getId() {
        return id;
    }

    public String getName() {
        return name;
    }

    public String getWebsite() {
        return website;
    }

    public String getAvatarURL() {
        return avatarURL;
    }
}
