2.0.1 • Published 8 years ago

dbc-node-ddbcontent-client v2.0.1

Weekly downloads
4
License
GNU GPL v3
Repository
github
Last release
8 years ago

dbc-node-ddbcontent-client

David David

Client for fetching data from a ddb library

##How to use:

import * as DdbContent from 'dbc-node-ddbcontent-client';
       

// Initialize service with required paramters. Returns methods on client
const ddbContent = DdbContent.init({
  endpoint: 'http://am.fs_rest.dev.inlead.dk/web',
  agency: 123456,
  key: 'abcdefg123456'
});

// make a query. This returns a promise.
ddbContent.getContentById({node: 1})
.then((result) => {
  console.log(result)
});
};

##Methods:

ddbContent.getContentById({node})

  • node: Id of the node that should be fetched REQUIRED

ddbContent.getContentList({amount, sort})

  • amount: Number of nodes to fetch (default = 10) REQUIRED
  • sort: Sorting parameter (default = 'nid') REQUIRED

Documentation of service api can be found at http://am.fs_rest.dev.inlead.dk/web

2.0.1

8 years ago

1.0.6

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago