Update gapi.class.php