VOWrappingPaperManagerProtocol
@protocol VOWrappingPaperManagerProtocol
VOWrappingPaperManagerProtocol is the interface for retrieving VOWrappingPaperMedias from the Vouchr Server.
-
Requests
VOWrappingPaperCategorys from the Vouchr Server.Declaration
Objective-C
- (void)requestWrappingPaperCategories: (nullable void (^)(NSArray<VOWrappingPaperCategory *> *_Nonnull)) onSuccess error:(nullable void (^)(NSError *_Nullable)) onError;Swift
func requestWrappingPaperCategories(_ onSuccess: ((Int32) -> Void)?, error onError: ((UnsafeMutablePointer<Int32>?) -> Void)? = nil)Parameters
onSuccess- block to be executed upon successful retrieval of
VOWrappingPaperCategorys.onError- error block if the wrapping papers were not retrieved successfully.
-
Retrieves a random
VOWrappingPaperMedia. If there areVOWrappingPaperMedias already cached, a random paper from that list will be returned. Otherwise, a network request will be performed.Declaration
Objective-C
- (void)getRandomWrappingPaperWithCompletion: (nonnull void (^)(VOWrappingPaperMedia *_Nonnull))completed;Swift
func getRandomWrappingPaper(completion completed: ((VOWrappingPaperMedia?) -> Void)!)Parameters
completed- completion block with the random
VOWrappingPaperMedia- A defaultVOWrappingPaperMediaif an error occurred.
View on GitHub
VOWrappingPaperManagerProtocol Protocol Reference