Skip to content
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

Merged
merged 7 commits into from
May 29, 2018
Merged

Add get categories api #169

merged 7 commits into from
May 29, 2018

Conversation

radyslavkrechet
Copy link
Contributor

No description provided.

Copy link
Contributor

@plzen plzen left a 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]>) {
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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

@codecov
Copy link

codecov bot commented May 15, 2018

Codecov Report

Merging #169 into feature/magento will increase coverage by 13.47%.
The diff coverage is 89.11%.

Impacted file tree graph

@@                 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
Impacted Files Coverage Δ
ShopApp_Gateway/Models/Category.swift 100% <ø> (ø) ⬆️
...App/Data/API/Adapters/MagentoCategoryAdapter.swift 100% <100%> (ø)
...pApp/Data/API/Adapters/MagentoProductAdapter.swift 100% <100%> (+100%) ⬆️
...PI/Alamofire/Routers/MagentoCategoriesRouter.swift 100% <100%> (ø)
.../Data/Repositories/ShopAppCategoryRepository.swift 100% <100%> (ø) ⬆️
.../Domain/Interactors/Main/CategoryListUseCase.swift 100% <100%> (ø) ⬆️
...API/Models/Responses/CustomAttributeResponse.swift 100% <100%> (+100%) ⬆️
...hopApp/Data/API/Adapters/MagentoImageAdapter.swift 75% <60%> (+75%) ⬆️
ShopApp/Data/API/Extentions/String+Html.swift 75% <75%> (ø)
ShopApp/Data/API/Alamofire/MagentoAPI.swift 81.23% <80.32%> (+81.23%) ⬆️
... and 28 more

@AntonoffEvgeniy AntonoffEvgeniy merged commit 0964130 into feature/magento May 29, 2018
@AntonoffEvgeniy AntonoffEvgeniy deleted the categories-api branch May 29, 2018 08:42
AntonoffEvgeniy pushed a commit that referenced this pull request May 29, 2018
* 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
AntonoffEvgeniy pushed a commit that referenced this pull request May 29, 2018
* 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
plzen pushed a commit that referenced this pull request Jun 8, 2018
* 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
plzen pushed a commit that referenced this pull request Jun 12, 2018
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants