-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add get categories api #169
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add tests
public func getCategoryList(perPage: Int, paginationValue: Any?, sortBy: SortingValue?, reverse: Bool, callback: @escaping RepoCallback<[ShopApp_Gateway.Category]>) { | ||
// TODO: Implement api method | ||
callback([], nil) | ||
public func getCategoryList(perPage: Int, paginationValue: Any?, sortBy: SortingValue?, reverse: Bool, rootCategoryId: String?, callback: @escaping RepoCallback<[ShopApp_Gateway.Category]>) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we avoid passing rootCategoryId
for each request? I think we can pass it to MagentoApi
class
if let sortBy = sortBy { | ||
switch sortBy { | ||
case .name: | ||
fieldName = nameField |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Double space in this line
case .createdAt: | ||
fieldName = createdAtField | ||
case .priceHighToLow, .priceLowToHigh: | ||
fieldName = priceField |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Double space in this line
b2f465b
to
341a5cf
Compare
Codecov Report
@@ Coverage Diff @@
## feature/magento #169 +/- ##
===================================================
+ Coverage 60.43% 73.9% +13.47%
===================================================
Files 261 264 +3
Lines 6902 7024 +122
===================================================
+ Hits 4171 5191 +1020
+ Misses 2731 1833 -898
|
* Add get categories api * Add tests for models * Add tests for adapters * Add session service tests * Add parameters builder and routers tests * Add base api tests * Add magento api tests
* Add get categories api * Add tests for models * Add tests for adapters * Add session service tests * Add parameters builder and routers tests * Add base api tests * Add magento api tests
* Add get categories api * Add tests for models * Add tests for adapters * Add session service tests * Add parameters builder and routers tests * Add base api tests * Add magento api tests
* Add get categories api * Add tests for models * Add tests for adapters * Add session service tests * Add parameters builder and routers tests * Add base api tests * Add magento api tests
No description provided.