# @izzle-org/crud-io

> Simple Crud Service Lib, based on OAuth2 Authorization and Axios Calls

Latest version **0.6.0** (published 2023-06-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install @izzle-org/crud-io
pnpm add @izzle-org/crud-io
yarn add @izzle-org/crud-io
bun add @izzle-org/crud-io
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.6.0 |
| Published | 2023-06-16 |
| First published | 2020-07-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 13.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Daniel Böhmer |
| Maintainers | sicbb |
| Keywords | Izzle, Crud |

## Links

- npm: https://www.npmjs.com/package/@izzle-org/crud-io
- Repository: https://git@github.com/izzle-org/crud-io-js
- Homepage: https://github.com/izzle-org/crud-io-js#readme
- Issues: https://github.com/izzle-org/crud-io-js/issues
- npm.io page: https://npm.io/package/@izzle-org/crud-io

## Dependencies (3)

- [axios](https://npm.io/package/axios.md) ^1.4.0
- [crypto-js](https://npm.io/package/crypto-js.md) ^4.1.1
- [jsonwebtoken](https://npm.io/package/jsonwebtoken.md) ^9.0.0

## Recent versions

- 0.6.0 (latest) — 2023-06-16
- 0.5.0 — 2022-03-17
- 0.4.6 — 2021-07-07
- 0.4.5 — 2021-07-06
- 0.4.4 — 2021-07-06
- 0.4.3 — 2021-07-05
- 0.4.2 — 2021-07-05
- 0.4.1 — 2021-02-02
- 0.4.0 — 2020-11-19
- 0.3.10 — 2020-11-09
- 0.3.9 — 2020-10-28
- 0.3.8 — 2020-10-28
- 0.3.7 — 2020-10-19
- 0.3.6 — 2020-09-21
- 0.3.5 — 2020-09-03
- … 1 more at https://npm.io/package/@izzle-org/crud-io/versions

## README

# Izzle Crud IO JS Lib

> Simple Crud Service Lib, based on OAuth2 Authorization and Axios Calls

## Installation

> Using npm:
 ```shell
 $ npm i -g npm
 $ npm i @izzle-org/crud-io
 ```

## Usage

> My Crud Service 'product.service.js'
```js
import { CrudService } from '@izzle-org/crud-io'

export default class extends CrudService {
    constructor () {
        super('products')
    }
}
```

> index.js
```js
import { ApiService, JwtService } from '@izzle-org/crud-io'

// Handle OAuth2
...
// JWT Config
JwtService.encrypt = true
JwtService.secretKey = 'foobar123'
JwtService.useSessionStorage()

JwtService.setToken({ access_token: 'foobar' })

// API Config
ApiService.init('https://api.foo.bar')
ApiService.setAuthHeader('Bearer ' + JwtService.getToken().access_token)

import ProductService from './product.service.js'

const service = new ProductService()

// GET https://api.foo.bar/products with Authorization Header (Bearer foobar)
let products = service.list()
```

## License

Copyright (c) 2020-present Daniel Böhmer

[MIT License](http://en.wikipedia.org/wiki/MIT_License)

---
_Source: https://npm.io/package/@izzle-org/crud-io · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
