Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
shopify_iossdk
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cemarose
shopify_iossdk
Commits
20bcf555
Commit
20bcf555
authored
Jul 15, 2016
by
David Muzi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
collectionID should appear before tags in product method
parent
b726651f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
BUYClientTest.m
Mobile Buy SDK/Mobile Buy SDK Tests/BUYClientTest.m
+1
-1
BUYClient+Storefront.h
Mobile Buy SDK/Mobile Buy SDK/Data/BUYClient+Storefront.h
+2
-2
BUYClient+Storefront.m
Mobile Buy SDK/Mobile Buy SDK/Data/BUYClient+Storefront.m
+2
-2
No files found.
Mobile Buy SDK/Mobile Buy SDK Tests/BUYClientTest.m
View file @
20bcf555
...
@@ -184,7 +184,7 @@ NSString * const BUYFakeCustomerToken = @"dsfasdgafdg";
...
@@ -184,7 +184,7 @@ NSString * const BUYFakeCustomerToken = @"dsfasdgafdg";
-
(
void
)
testProductsInCollection
-
(
void
)
testProductsInCollection
{
{
BUYRequestOperation
*
task
=
(
BUYRequestOperation
*
)[
self
.
client
getProductsPage
:
1
withTags
:
nil
inCollection
:
@1
sortOrder
:
BUYCollectionSortCollectionDefault
completion
:^
(
NSArray
<
BUYProduct
*>
*
products
,
NSUInteger
page
,
BOOL
reachedEnd
,
NSError
*
error
)
{}];
BUYRequestOperation
*
task
=
(
BUYRequestOperation
*
)[
self
.
client
getProductsPage
:
1
inCollection
:
@1
withTags
:
nil
sortOrder
:
BUYCollectionSortCollectionDefault
completion
:^
(
NSArray
<
BUYProduct
*>
*
products
,
NSUInteger
page
,
BOOL
reachedEnd
,
NSError
*
error
)
{}];
XCTAssertEqualObjects
(
task
.
originalRequest
.
HTTPMethod
,
@"GET"
);
XCTAssertEqualObjects
(
task
.
originalRequest
.
HTTPMethod
,
@"GET"
);
XCTAssertEqualObjects
(
task
.
originalRequest
.
URL
.
scheme
,
@"https"
);
XCTAssertEqualObjects
(
task
.
originalRequest
.
URL
.
scheme
,
@"https"
);
XCTAssertEqualObjects
(
task
.
originalRequest
.
URL
.
host
,
@"test_shop"
);
XCTAssertEqualObjects
(
task
.
originalRequest
.
URL
.
host
,
@"test_shop"
);
...
...
Mobile Buy SDK/Mobile Buy SDK/Data/BUYClient+Storefront.h
View file @
20bcf555
...
@@ -216,14 +216,14 @@ typedef void (^BUYDataTagsListBlock)(NSArray <NSString *> * _Nullable tags, NSUI
...
@@ -216,14 +216,14 @@ typedef void (^BUYDataTagsListBlock)(NSArray <NSString *> * _Nullable tags, NSUI
* Fetches the products in the given collection with a given sort order
* Fetches the products in the given collection with a given sort order
*
*
* @param page Index of the page requested
* @param page Index of the page requested
* @param tags an array of tags which each product must contain
* @param collectionId The `collectionId` found in the BUYCollection object to fetch the products from
* @param collectionId The `collectionId` found in the BUYCollection object to fetch the products from
* @param tags An array of tags which each product must contain
* @param sortOrder The sort order that overrides the default collection sort order
* @param sortOrder The sort order that overrides the default collection sort order
* @param block (NSArray *products, NSUInteger page, BOOL reachedEnd, NSError *error)
* @param block (NSArray *products, NSUInteger page, BOOL reachedEnd, NSError *error)
*
*
* @return the associated BUYRequestOperation
* @return the associated BUYRequestOperation
*/
*/
-
(
NSOperation
*
)
getProductsPage
:(
NSUInteger
)
page
withTags
:(
nullable
NSArray
<
NSString
*>
*
)
tags
inCollection
:(
nullable
NSNumber
*
)
collectionId
sortOrder
:(
BUYCollectionSort
)
sortOrder
completion
:(
BUYDataProductListBlock
)
block
;
-
(
NSOperation
*
)
getProductsPage
:(
NSUInteger
)
page
inCollection
:(
nullable
NSNumber
*
)
collectionId
withTags
:(
nullable
NSArray
<
NSString
*>
*
)
tags
sortOrder
:(
BUYCollectionSort
)
sortOrder
completion
:(
BUYDataProductListBlock
)
block
;
@end
@end
...
...
Mobile Buy SDK/Mobile Buy SDK/Data/BUYClient+Storefront.m
View file @
20bcf555
...
@@ -160,10 +160,10 @@ static NSString * const BUYCollectionsKey = @"collection_listings";
...
@@ -160,10 +160,10 @@ static NSString * const BUYCollectionsKey = @"collection_listings";
-
(
NSOperation
*
)
getProductsPage
:(
NSUInteger
)
page
inCollection
:(
NSNumber
*
)
collectionId
completion
:(
BUYDataProductListBlock
)
block
-
(
NSOperation
*
)
getProductsPage
:(
NSUInteger
)
page
inCollection
:(
NSNumber
*
)
collectionId
completion
:(
BUYDataProductListBlock
)
block
{
{
return
[
self
getProductsPage
:
page
withTags
:
nil
inCollection
:
collectionId
sortOrder
:
BUYCollectionSortCollectionDefault
completion
:
block
];
return
[
self
getProductsPage
:
page
inCollection
:
collectionId
withTags
:
nil
sortOrder
:
BUYCollectionSortCollectionDefault
completion
:
block
];
}
}
-
(
NSOperation
*
)
getProductsPage
:(
NSUInteger
)
page
withTags
:(
NSArray
<
NSString
*>
*
)
tags
inCollection
:(
NSNumber
*
)
collectionId
sortOrder
:(
BUYCollectionSort
)
sortOrder
completion
:(
BUYDataProductListBlock
)
block
-
(
NSOperation
*
)
getProductsPage
:(
NSUInteger
)
page
inCollection
:(
nullable
NSNumber
*
)
collectionId
withTags
:(
nullable
NSArray
<
NSString
*>
*
)
tags
sortOrder
:(
BUYCollectionSort
)
sortOrder
completion
:(
BUYDataProductListBlock
)
block
{
{
NSMutableDictionary
*
params
=
@{
NSMutableDictionary
*
params
=
@{
@"limit"
:
@
(
self
.
pageSize
),
@"limit"
:
@
(
self
.
pageSize
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment