@axdspub/axiom-ui-data-services
v1.0.4
Published
`npm run storybook`
Readme
Storybook
npm run storybook
Local development
Be sure yalc is installed:
npm i yalc -g
Then
yalc publish
In consuming project:
yalc add @axdspub/axiom-ui-data-services
and if already exists:
yalc update @axdspub/axiom-ui-data-services
Publish
npm login --scope=@axdspub
npm publish --dryrunIf all looks good
npm publish --access publicUsage
DataService
- Use
DataServiceto make a single requestconst ds = new DataService({ url:'https://oikos.axds.co/rest/context', type:'none', }) const data = await ds.get() // use ds.destroy to cancel - Extend
DataService:- To implement a custom
makeUrlfunction (provide example) - To implement a custom data format that isn't yet supported (provide example)
- To implement a custom
RequestItem
- Includes a DataService for data and one for metadata
Todo
- Explain types and creating urls
- Explain parsers
- Probably need to be able to pass in a parser
- Provide storybook examples
- Exclude unnecessary files from published version
