apeman-service-api
Apeman service for API access.
Last updated 10 months ago by okunishinishi .
MIT · Repository · Bugs · Original npm · Tarball
$ cnpm install apeman-service-api 
SYNC missed versions from official npm registry.

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

Maintainers (1)
Downloads
Today 1
This Week 1
This Month 1
Last Day 0
Last Week 0
Last Month 12
Dependencies (6)
Dev Dependencies (15)
Dependents (2)

Copyright 2014 - 2017 © taobao.org |