Currently, WriteFreelyClient is not especially DRY — because so much of the request code is repeatable, it would make more sense to pull that out into a RequestTemplate of sorts.
This should also help with the type_body_length linting issue for the WriteFreelyClient class being too long:
Type body should span 200 lines or less excluding comments and whitespace: currently spans 519 lines
(This exceeds SwiftLint's warning level, and would instead be a build-blocking error once #6 is implemented, so this should be labeled a bug rather than an enhancement.)
Currently,
WriteFreelyClient
is not especially DRY — because so much of the request code is repeatable, it would make more sense to pull that out into aRequestTemplate
of sorts.This should also help with the
type_body_length
linting issue for theWriteFreelyClient
class being too long:(This exceeds SwiftLint's warning level, and would instead be a build-blocking error once #6 is implemented, so this should be labeled a bug rather than an enhancement.)
Useful reference: "Keeping Your Network Layer Clean With DRY" by Frank Courville