Closed josefdolezal closed 7 years ago
Before we start implementing new features (such as KOS, Obedar/LunchGuy, ..) we should refactor network operations. Now there are 3 operations (2 html, 1 json).
Each operation now has similar structure to this:
init(someArgs:) {} override func start() {} func handle(response:) {}
Lets make some generic abstraction over these operation. My suggestion is:
success
failure
We can discuss it here and then split it into multiple issues.
Before we start implementing new features (such as KOS, Obedar/LunchGuy, ..) we should refactor network operations. Now there are 3 operations (2 html, 1 json).
Each operation now has similar structure to this:
Lets make some generic abstraction over these operation. My suggestion is:
success
andfailure
, wherefailure
may have default implementation (in protocol or parent class)We can discuss it here and then split it into multiple issues.