0.5.1 • Published 3 years ago

@21epub/epub-data-client v0.5.1

Weekly downloads
33
License
MIT
Repository
github
Last release
3 years ago

@21epub/epub-data-client

data api client for epub

NPM JavaScript Style Guide Build Status Codecov

Intro

Well, This is a data client for Epub . ( Can be reformed for other Usage )

Feature

  • Easy-to-use
  • Typescript Only
  • RestFul data client support
  • Object Client support
  • Local data manupulate
  • Hooks for data client
  • Both for web and node supported
  • Uniform the error catch for both http error and response code error

Install

npm install --save @21epub/epub-data-client

Usage

import { DataClient } from '@21epub/epub-data-client'

const client = new DataClient('http://url.to/data/')

client.getAll()

class Example extends Component {
  data = client.useData()
  render() {
    return (
      <>
        <div> Total Data: {data?.length} </div>
      </>
    )
  }
}

For Details: See Example

Developing and running on localhost

First install dependencies and then install peerDeps for parcel dev:

npm install
npm run install-peers

To run Example in hot module reloading mode:

npm start

To create a parcel example production build:

npm run build-prod

To create a bundle library module build:

npm run build

To update documentation

npm run doc

Running

Open the file dist/index.html in your browser

Testing

To run unit tests:

npm test

License

MIT © 21epub

0.5.1

3 years ago

0.5.0

3 years ago

0.4.1

3 years ago

0.4.0

3 years ago

0.3.0

4 years ago

0.2.1

4 years ago

0.1.6

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago