apeman-service-api

3.0.0 • Public • Published

apeman-service-api

Build Status npm Version JS Standard

Apeman service for API access.

Installation

$ npm install apeman-service-api --save

Usage

#!/usr/bin/env node

'use strict'

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

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


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

API

apeman-service-api@2.1.1

Apeman service for API access.

Functions

create(args) -> ApApiService

Create the service instance

Param Type Description
args *

ApApiService Class

Service

new ApApiService(store, options)

Constructor of ApApiService class

Param Type Description
store Object Redux store
options Object Optional settings

service.configure(url)

Configure api

Param Type Description
url string

service.reach(args) -> *

Test reachability of the API

Param Type Description
args

service.use(name) -> *

Use api

Param Type Description
name string Name of API

service.url(pathname) -> string

Get url

Param Type Description
pathname string Url path name

License

This software is released under the MIT License.

Links

Readme

Keywords

Package Sidebar

Install

npm i apeman-service-api

Weekly Downloads

14

Version

3.0.0

License

MIT

Last publish

Collaborators

  • okunishinishi