Slippers
Slippers adds some structure around common networking tasks like refreshing, paging, and json parsing.
Specifically, it provides:
- A protocol called
Refreshablewhich requires arefreshfunction - 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
Pageablewhich requiresnextPageandfetchPagefunctions - A functional implementation of
Pageable+Refreshablethat manages the page number for you - An extension to
Pageablethat can be used withUITableViewDelegates to simplify infinite lists - An extension to
Pageablethat can be used withUICollectionViewDelegates 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
JSONEncoderandJSONDecoderavailable throughout your project with smart defaults set on them - An
Idclass 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.