Added some helper methods to Api.