public function parse($achievement)
    {
        // add default fields
        $this->id = $achievement['achievement']['id'];
        $this->name = $achievement['achievement']['name'];
        $this->category = $achievement['achievement']['category'];

        // add requirements if available
        if (isset($achievement['requirements'])) {
            $this->requirements = $achievement['requirements'];
        }

        // add user state if available
        if (isset($achievement['level'])) {
            $this->level = $achievement['level'];
        }
        if (isset($achievement['score'])) {
            $this->score = $achievement['score'];
        }
    }