# otomatk

> Iridium Model REST Mapper for Express and Seneca

Latest version **0.4.12** (published 2015-12-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install otomatk
pnpm add otomatk
yarn add otomatk
bun add otomatk
```

## 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.4.12 |
| Published | 2015-12-28 |
| First published | 2015-12-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4.0 |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Gautham Ramachandran |
| Maintainers | peek4y |

## Links

- npm: https://www.npmjs.com/package/otomatk
- Repository: https://github.com/peek4y/otomatk
- Homepage: https://github.com/peek4y/otomatk#readme
- Issues: https://github.com/peek4y/otomatk/issues
- npm.io page: https://npm.io/package/otomatk

## Dependencies (3)

- [ramda](https://npm.io/package/ramda.md) ^0.18.0
- [mongodb](https://npm.io/package/mongodb.md) ^2.0.52
- [bluebird](https://npm.io/package/bluebird.md) ^3.1.1

## Recent versions

- 0.4.12 (latest) — 2015-12-28
- 0.4.11 — 2015-12-23
- 0.4.10 — 2015-12-23
- 0.4.9 — 2015-12-23
- 0.4.8 — 2015-12-23
- 0.4.7 — 2015-12-23
- 0.4.6 — 2015-12-22
- 0.4.5 — 2015-12-22
- 0.4.4 — 2015-12-22
- 0.4.3 — 2015-12-22
- 0.4.1 — 2015-12-22
- 0.4.0 — 2015-12-21
- 0.3.0 — 2015-12-20
- 0.2.5 — 2015-12-20
- 0.2.0 — 2015-12-20
- … 2 more at https://npm.io/package/otomatk/versions

## README

# Otomatk

A tiny REST-like mapper for [Iridium](http://sierrasoftworks.github.io/Iridium/) models with [Seneca](http://senecajs.org/) micro-services toolkit and express.js

### Status
[![Build Status](https://travis-ci.org/peek4y/otomatk.svg?branch=master)](https://travis-ci.org/peek4y/otomatk)
## TODO
* Add support for express.js
* More test cases

## Install

```javascript
npm install --save otomatk
```

## Using with seneca.
```javascript
const Otomatk = require('otomatk');
const Senecafy = Otomatk.Senecafy;
const seneca = require('seneca')();

// You can provide your own seneca role name.
var senecafy = new Senecafy(seneca, rolename);

senecafy.load([IridiumModel]) 

// You can also send as a single iridium model
senecafy.load(IridiumModel);


// Using the senecafied action patterns of the model.
seneca.act({ role: rolename, plugin: IridiumModel.collectionName, cmd: 'list' }, (err, data) => {
  // Other logic.  
}); 
```

## Available Commands
```
// Similar to seneca data entities.
{ cmd: 'save' }
{ cmd: 'list' }
{ cmd: 'remove' }
{ cmd: 'load' } 
```

**NOTE:** The plugin name for all the senecafied patterns are mostly the name of the Iridium Collection/Model (Model.collectionName)

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