After careful consideration, it is required to move the AmiiboMockClient client type out of the public scope of the library, as this is a type that only should be used for testing purposes by the SPM package.
Explanation
It was assumed that exposing the APIClient protocol publicly would be an anti-pattern, so for that reason the AmiiboClient enumeration type that provides both a mock and a live client, each case representing either a AmiiboMockClient and a AmiiboLiveClient client types, is being expose by the library. After a review of this particular decision, the conclusion is that the AmiiboClient enumeration and the AmiiboMockClient should not be exposed at all.
Posible solution
To improve the API design of the public interface, the following actions should be done:
Rename the APIClient protocol as AmiiboClient;
Expose the AmiiboClient protocol publicly;
Remove the AmiiboClient enumeration from the library;
Move the AmiiboMockClient client type to the tests target;
Update the initializer for the AmiiboService service type.
# Summary
After careful consideration, it is required to move the `AmiiboMockClient` client type out of the public scope of the library, as this is a type that only should be used for testing purposes by the SPM package.
# Explanation
It was assumed that exposing the `APIClient` protocol publicly would be an anti-pattern, so for that reason the `AmiiboClient` enumeration type that provides both a `mock` and a `live` client, each case representing either a `AmiiboMockClient` and a `AmiiboLiveClient` client types, is being expose by the library. After a review of this particular decision, the conclusion is that the `AmiiboClient` enumeration and the `AmiiboMockClient` should not be exposed at all.
# Posible solution
To improve the API design of the public interface, the following actions should be done:
1. Rename the `APIClient` protocol as `AmiiboClient`;
2. Expose the `AmiiboClient` protocol publicly;
3. Remove the `AmiiboClient` enumeration from the library;
4. Move the `AmiiboMockClient` client type to the tests target;
5. Update the initializer for the `AmiiboService` service type.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
After careful consideration, it is required to move the
AmiiboMockClientclient type out of the public scope of the library, as this is a type that only should be used for testing purposes by the SPM package.Explanation
It was assumed that exposing the
APIClientprotocol publicly would be an anti-pattern, so for that reason theAmiiboClientenumeration type that provides both amockand aliveclient, each case representing either aAmiiboMockClientand aAmiiboLiveClientclient types, is being expose by the library. After a review of this particular decision, the conclusion is that theAmiiboClientenumeration and theAmiiboMockClientshould not be exposed at all.Posible solution
To improve the API design of the public interface, the following actions should be done:
APIClientprotocol asAmiiboClient;AmiiboClientprotocol publicly;AmiiboClientenumeration from the library;AmiiboMockClientclient type to the tests target;AmiiboServiceservice type.Merged in PR #12.