Commit 837e5b9e by Dima Bart

Remove getCollections method.

parent 8a119535
......@@ -174,7 +174,7 @@
[OHHTTPStubs stubUsingResponseWithKey:@"testGetCollection_0" useMocks:[self shouldUseMocks]];
XCTestExpectation *expectation = [self expectationWithDescription:NSStringFromSelector(_cmd)];
[self.client getCollections:^(NSArray *collections, NSError *error) {
[self.client getCollectionsPage:1 completion:^(NSArray<BUYCollection *> *collections, NSUInteger page, BOOL reachedEnd, NSError * _Nullable error) {
XCTAssertNotNil(collections);
XCTAssertNil(error);
......
......@@ -158,16 +158,7 @@ typedef void (^BUYDataProductListBlock)(NSArray<BUYProduct *> * _Nullable produc
*
* @return The associated BUYRequestOperation
*/
- (BUYRequestOperation *)getProductsByIds:(NSArray *)productIds completion:(BUYDataProductsBlock)block;
/**
* Fetches the collections on the shop
*
* @param block (^BUYDataCollectionsBlock)(NSArray *collections, NSError *error)
*
* @return The associated BUYRequestOperation
*/
- (BUYRequestOperation *)getCollections:(BUYDataCollectionsBlock)block;
- (BUYRequestOperation *)getProductsByIds:(NSArray<NSString *> *)productIds completion:(BUYDataProductsBlock)block;
/**
* Fetches collections based off page
......
......@@ -112,13 +112,6 @@ static NSString * const BUYCollectionsKey = @"collection_listings";
}];
}
- (BUYRequestOperation *)getCollections:(BUYDataCollectionsBlock)block
{
return [self getCollectionsPage:1 completion:^(NSArray<BUYCollection *> *collections, NSUInteger page, BOOL reachedEnd, NSError *error) {
block(collections, error);
}];
}
- (BUYRequestOperation *)getCollectionsPage:(NSUInteger)page completion:(BUYDataCollectionsListBlock)block
{
NSURL *url = [self urlForCollectionListingsWithParameters:@{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment