Added callApiMethod function and bugfixed response format from getPhotos