Implemented getCurrentPage and added getTotalPages in API