3.0.0 • Published 9 years ago

apeman-service-entity v3.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

apeman-service-entity

Build Status npm Version JS Standard

Apemna service for entity

Installation

$ npm install apeman-service-entity --save

Usage

#!/usr/bin/env node

'use strict'

const { ApEntityService } = require('apeman-service-entity')
const { createStore } = require('redux')
const { reducer } = require('apeman-service-base')
const co = require('co')

co(function * () {
  let store = createStore(reducer)
  let service = new ApEntityService(store)


}).catch((err) => console.error(err))

API

apeman-service-entity@2.2.1

Apemna service for entity

Functions

create(args) -> ApEntityService

Create the service instance

ParamTypeDescription
args*

ApEntityService Class

Service

new ApEntityService(store, options)

Constructor of ApEntityService class

ParamTypeDescription
storeObjectRedux store
optionsObjectOptional settings

service.getEntityList(entityName) -> Object

Get entity as list

ParamTypeDescription
entityNamestringName of entity.

service.getEntityOne(entityName) -> *

Get detailed entity

ParamTypeDescription
entityNamestringName of entity.

service.getEntityResources(entityName) -> Object

Get entity resources.

ParamTypeDescription
entityNamestringName of entity.

service.updateEntityResources(entityName, entities) -> Promise

Update entity resources.

ParamTypeDescription
entityNamestringName of entity.
entitiesArray.<Object>,ObjectEntities to push

service.setEntityList(entityName, entities, counts) -> Promise

Set entity list.

ParamTypeDescription
entityNamestringName of entity.
entitiesArray.<Object>Entities to push
countsObjectCount info

service.pushEntityList(entityName, entities, counts) -> Promise

Push to entity list.

ParamTypeDescription
entityNamestringName of entity.
entitiesArray.<Object>Entities to push
countsObjectCount info

service.unshiftEntityList(entityName, entities, counts) -> Promise

Unshift to entity list.

ParamTypeDescription
entityNamestringName of entity.
entitiesArray.<Object>Entities to unshift
countsObjectCount info

service.setEntityOne(entityName, entity) -> Promise

Set entity one

ParamTypeDescription
entityNamestringName of entity.
entityObjectEntity to set.

service.clearEntityList(entityName) -> Promise

Clear entity list

ParamTypeDescription
entityNamestringName of entity.

service.clearEntityOne(entityName) -> Promise

Clear entity one

ParamTypeDescription
entityNamestringName of entity.

service.clearEntityResource(entityName) -> Promise

Clear entity resource

ParamTypeDescription
entityNamestringName of entity.

service.purgeEntity(entityName) -> Promise

Clear entity one

ParamTypeDescription
entityNamestringName of entity.

service.invalidateEntityCache(entityName) -> Promise

Invalidate entity cache

ParamTypeDescription
entityNamestringName of entity.

License

This software is released under the MIT License.

Links

3.0.0

9 years ago

2.2.0

9 years ago

2.1.0

9 years ago

2.0.0

10 years ago

1.2.2

10 years ago

1.2.1

10 years ago

1.2.0

10 years ago

1.1.0

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago