Comments (7)
"Store" doesn't need to be strictly used with Retrofit, your proposal should be a 3-rd party plugin :D.
from store.
It absoutely would be a seperate module/artifact. This is merely a convenience the way the Middleware is. Thinking about it more you don't even need to read annotations, just field types/names.
from store.
Step 1. Generate fetcher and Barcodes.
Step 2. Generate store for BufferedSource input only
Step 3. Add our own annotations to drive stores with and without persister/caches
from store.
Could you provide an example of how should it look like?
For example lets take Api
interface from the sample app. Should the generator take both methods (annotated with @GET("r/{subredditName}/new/.json")
) and generate Stores for RedditData
and ResponseBody
. Or should we be able to annotate particular methods.
Maybe I am missing something?
from store.
I'm actually going to bang this out tomorrow. What I was thinking is annotate the entire class with @Stores which would generate a store for each Get request. You'd have to pass a factory that can create a gson instance to the annotation. You'd also need to pass the factory that creates a file system. Sorry still half an idea. I'll open a pr tomorrow and we can refine from there.
from store.
not done but its a start: currently generating custom Barcodes
and a Module that can be extended or used with Dagger to create Stores
#64
from store.
Dying on the vine but moshi adapter syntax gave me some ideas.
from store.
Related Issues (20)
- Store 4 design document HOT 2
- Observe changes in disk without invalidating cache HOT 2
- NetworkOnMainThread thrown when performing a clear from the MainThread HOT 1
- Question: Convert List<T> From API to BufferedSource
- Question: Shouldn't Persister.write return single which will write to cache only after subscribe? HOT 2
- Sample crashes on launch
- Get data always hits the network without persister HOT 5
- Clear FileSystemPersister HOT 1
- Support for partial fetches (for paginated APIs) HOT 1
- Clearable HOT 2
- Feature Request : support for multiple get/fetch HOT 1
- RecordPersister's 'Expiration' is not working HOT 8
- Misleading docs and behavior of Store.clear() HOT 6
- How to determine if a key is in memory cache? HOT 3
- fetchWithResult returns NETWORK even on network errors HOT 2
- Issue with gradle plugin 3.4.0 HOT 11
- Provide a method for getting data from memory cache
- Having trouble fetching data using android nytimes store library HOT 1
- Request is made multiple times
- This library seems to be deprecated. Other alternatives? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from store.