Paging and sharing network calls between all repository instances.
- add isFirstFetch to cachestate
- add mock objects for paging feature
- improve paging api. Add function to easily go to the next page of the cache. Filter none state when observing cache. Create cache state object just for paging.
- create repository for paging
- share network calls between all repositories
Forgot to add refreshIfNoCache
functionality to RepositoryMock
from 0.7.0 release.
- Added
refreshIfNoCache
functionality toRepositoryMock
.
- Enable or disable automatic refresh in a Repository. Issue
- Assert that a cache exists, or refresh. Issue
- Convert instances of
DataState
to another data type withconvert()
- Allow
DataSource
instances to define Error type from fetching
- Cache state machine crash, traveling to incorrect node. Issue
- Repository internal refresh calls added to Rx dispose bag to cancel on deinit.
- Utilities to write integration tests against Teller
- Pre-built mock for Repository for unit testing
- Breaking Change Changed DataState parsing switch statement to more simple API.
- Breaking Change Remove need to subclass Repository in API!
- Breaking Change Remove all local functionality. Teller only caches network fetches now.
- Breaking Change Switch to using Swift5's Result object in API. This (hopefully) concludes the Swift5 conversion.
- Fix crash when localdatastate none #55
- Compile Teller with Swift5 and XCode 10.2
Fixed crash when delivering the OnlineCacheState when state of cache is none.
- Fixed crash when calling
OnlineCacheState.cacheState()
when cache state is none.
Fixed crash in OnlineRepository after first fetch is completed successfully. Do not use 0.2.0-alpha, use this release instead.
- Fixed #45
Changes to the API. Thread safety and bug fixes.
- Breaking Change
OnlineRepository
'ssync()
has been renamed torefresh()
. - Breaking Change
OnlineDataState.FetchingFreshDataState
has been renamed toOnlineDataState.NoCacheState
. - Breaking Change A few of the properties in
OnlineDataState
have been renamed. Even though it's best practice to useOnlineDatatState.___State
to parse it, you can access the properties manually if you wish. - Breaking Change
OnlineRepositoryDataSource.observeCachedData()
andOnlineRepositoryDataSource.isDataEmpty()
gets called on UI thread.OnlineRepositoryDataSource.saveData()
gets called on background thread. #28 OnlineRepository.observe()
andLocalRepository.observe()
no longerthrows
. Observe anytime you wish and receive event updates through all changes of the repository.OnlineRepository.refresh()
calls are shared in the sameOnlineRepository
instance. This saves on the amount of network calls performed.OnlineRepository.observe()
observers are all notified whenOnlineRepository.refresh()
actions are performed. #24OnlineRepository
is thread safe.
OnlineRepository
now supports observing 2+ queries, as long as it's the same type of data. #38- Delete Teller data for development purposes or when someone logs out of your app and the data is cleared. #19
OnlineDataState
has been refactored to using a finite state machine implementation. SeeOnlineDataStateStateMachine
. It's a immutable object that represents an immutableOnlineDataState
instance.- Fetching fresh cache data and the state of the cache data have been decoupled in
OnlineDataState
. Each of these 2 different states (fetching and cache) are updated independently from each other in theOnlineRepository
so decoupling them fixes bugs that have been reported.
- Fixed memory leak's in the Rx observables inside of
LocalRepository
andOnlineRepository
. This also fixes the repositories being able todeinit
now which results in the internal observables being disposed (the intended behavior). - Fixed #20
- Fixed #41
- Fixed #32
- Fixed #29
First release of Teller!
LocalRepository
for saving and querying locally cached data.OnlineRepository
for saving, querying, and fetching remote data that is cached locally.- Unit tests for all parts of the library.
- README.md documentation on status of project and how to use it.