Slippers
Slippers adds some structure around common networking tasks like refreshing, paging, and json parsing.
Specifically, it provides:
- A protocol called
Refreshable
which requires arefresh
function - A functional implementation of
Refreshable
- A 'meta' refresher class which will accept bunch of refreshables and refresh all of them on command
- A protocol called
Pageable
which requiresnextPage
andfetchPage
functions - A functional implementation of
Pageable
+Refreshable
that manages the page number for you - An extension to
Pageable
that can be used withUITableViewDelegate
s to simplify infinite lists - An extension to
Pageable
that can be used withUICollectionViewDelegate
s to simplify infinite lists - An array extension that allows you to use a simple array to simulate paginated batches of elements
- A class that makes a single
JSONEncoder
andJSONDecoder
available throughout your project with smart defaults set on them - An
Id
class that you can use transparently for integer server ids which helps enforce type consistency when passed around
Installation
To install Slippers, simply add the following line to your Podfile:
pod 'Slippers', git: 'https://github.com/ThryvInc/slippers'
Author
Elliot Schrock
License
Slippers is available under the MIT license. See the LICENSE file for more info.