UNPKG

4.71 kBMarkdownView Raw
1apeman-service-base
2==========
3
4<!---
5This file is generated by ape-tmpl. Do not update manually.
6--->
7
8<!-- Badge Start -->
9<a name="badges"></a>
10
11[![Build Status][bd_travis_shield_url]][bd_travis_url]
12[![Code Climate][bd_codeclimate_shield_url]][bd_codeclimate_url]
13[![Code Coverage][bd_codeclimate_coverage_shield_url]][bd_codeclimate_url]
14[![npm Version][bd_npm_shield_url]][bd_npm_url]
15[![JS Standard][bd_standard_shield_url]][bd_standard_url]
16
17[bd_repo_url]: https://github.com/apeman-service-labo/apeman-service-base
18[bd_travis_url]: http://travis-ci.org/apeman-service-labo/apeman-service-base
19[bd_travis_shield_url]: http://img.shields.io/travis/apeman-service-labo/apeman-service-base.svg?style=flat
20[bd_travis_com_url]: http://travis-ci.com/apeman-service-labo/apeman-service-base
21[bd_travis_com_shield_url]: https://api.travis-ci.com/apeman-service-labo/apeman-service-base.svg?token=
22[bd_license_url]: https://github.com/apeman-service-labo/apeman-service-base/blob/master/LICENSE
23[bd_codeclimate_url]: http://codeclimate.com/github/apeman-service-labo/apeman-service-base
24[bd_codeclimate_shield_url]: http://img.shields.io/codeclimate/github/apeman-service-labo/apeman-service-base.svg?style=flat
25[bd_codeclimate_coverage_shield_url]: http://img.shields.io/codeclimate/coverage/github/apeman-service-labo/apeman-service-base.svg?style=flat
26[bd_gemnasium_url]: https://gemnasium.com/apeman-service-labo/apeman-service-base
27[bd_gemnasium_shield_url]: https://gemnasium.com/apeman-service-labo/apeman-service-base.svg
28[bd_npm_url]: http://www.npmjs.org/package/apeman-service-base
29[bd_npm_shield_url]: http://img.shields.io/npm/v/apeman-service-base.svg?style=flat
30[bd_standard_url]: http://standardjs.com/
31[bd_standard_shield_url]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg
32
33<!-- Badge End -->
34
35
36<!-- Description Start -->
37<a name="description"></a>
38
39Abstract service
40
41<!-- Description End -->
42
43
44<!-- Overview Start -->
45<a name="overview"></a>
46
47
48
49<!-- Overview End -->
50
51
52<!-- Sections Start -->
53<a name="sections"></a>
54
55<!-- Section from "doc/guides/01.Installation.md.hbs" Start -->
56
57<a name="section-doc-guides-01-installation-md"></a>
58
59Installation
60-----
61
62```bash
63$ npm install apeman-service-base --save
64```
65
66
67<!-- Section from "doc/guides/01.Installation.md.hbs" End -->
68
69<!-- Section from "doc/guides/02.Usage.md.hbs" Start -->
70
71<a name="section-doc-guides-02-usage-md"></a>
72
73Usage
74---------
75
76```javascript
77#!/usr/bin/env node
78
79'use strict'
80
81const apemanServiceBase = require('apeman-service-base')
82
83```
84
85
86<!-- Section from "doc/guides/02.Usage.md.hbs" End -->
87
88<!-- Section from "doc/guides/03.API.md.hbs" Start -->
89
90<a name="section-doc-guides-03-a-p-i-md"></a>
91
92API
93---------
94
95# apeman-service-base@1.1.8
96
97Abstract service
98
99+ Functions
100 + [create(args)](#apeman-service-base-function-create)
101+ [ApService](apeman-service-base-classes) Class
102 + [new ApService()](#apeman-service-base-classes-ap-service-constructor)
103 + [service.get(keys)](#apeman-service-base-classes-ap-service-get)
104 + [service.dispatch(actionType, fieldName, value, isError)](#apeman-service-base-classes-ap-service-dispatch)
105
106## Functions
107
108<a class='md-heading-link' name="apeman-service-base-function-create" ></a>
109
110### create(args) -> `ApService`
111
112Create the service instance
113
114| Param | Type | Description |
115| ----- | --- | -------- |
116| args | * | |
117
118
119
120<a class='md-heading-link' name="apeman-service-base-classes"></a>
121
122## ApService Class
123
124Abstract service
125
126
127<a class='md-heading-link' name="apeman-service-base-classes-ap-service-constructor" ></a>
128
129### new ApService()
130
131Constructor of ApService class
132
133
134
135<a class='md-heading-link' name="apeman-service-base-classes-ap-service-get" ></a>
136
137### service.get(keys) -> `*`
138
139Get store values
140
141| Param | Type | Description |
142| ----- | --- | -------- |
143| keys | string | Keys to dig |
144
145
146<a class='md-heading-link' name="apeman-service-base-classes-ap-service-dispatch" ></a>
147
148### service.dispatch(actionType, fieldName, value, isError)
149
150Dispatch an action
151
152| Param | Type | Description |
153| ----- | --- | -------- |
154| actionType | string | Action type to dispatch |
155| fieldName | string | Field name to dispath |
156| value | * | Value to dispatch |
157| isError | boolean | Is error or not |
158
159
160
161
162
163
164
165<!-- Section from "doc/guides/03.API.md.hbs" End -->
166
167
168<!-- Sections Start -->
169
170
171<!-- LICENSE Start -->
172<a name="license"></a>
173
174License
175-------
176This software is released under the [MIT License](https://github.com/apeman-service-labo/apeman-service-base/blob/master/LICENSE).
177
178<!-- LICENSE End -->
179
180
181<!-- Links Start -->
182<a name="links"></a>
183
184Links
185------
186
187+ [apeman][apeman_url]
188
189[apeman_url]: https://github.com/apeman-labo/apeman
190
191<!-- Links End -->