@frontender-magazine/fm-user
SDK for user service api
Last updated 3 years ago by silentimp .
CC-BY-4.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @frontender-magazine/fm-user 
SYNC missed versions from official npm registry.

Documentation

DummyService

Extends TMMicroServiceAPI

Dummy Micro Service API that you may adopt for your needs

Parameters

  • url string service url
  • token (string | null) user access tocken if available (optional, default null)

Array

Posts list object

Type: PostList

Properties

  • null-null Array<Post> array of posts

Post

Post object

Type: Post

Properties

messages

Object with class service messages

get

Get posts list

Examples

Read posts list

(async () => {
  const Dummy = new DummyService('https://jsonplaceholder.typicode.com/');
  const list = await Dummy.get();
})();

Returns PostList array of posts

post

Create post

Parameters

Examples

Create post

(async () => {
  const Dummy = new DummyService('https://jsonplaceholder.typicode.com/');
  const details = await Dummy.post('My Title', 'My Text');
})();

Returns Post created post

details

Read specific post

Parameters

Examples

Get post

(async () => {
  const Dummy = new DummyService('https://jsonplaceholder.typicode.com/');
  const details = await Dummy.details(2);
})();

Returns Post post content

Current Tags

  • 1.0.9                                ...           latest (3 years ago)

7 Versions

  • 1.0.9                                ...           3 years ago
  • 1.0.8                                ...           3 years ago
  • 1.0.7                                ...           3 years ago
  • 1.0.6                                ...           3 years ago
  • 1.0.5                                ...           3 years ago
  • 1.0.4                                ...           3 years ago
  • 1.0.3                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 2
Last Month 11
Dependencies (33)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |