Labrador utils


License
ISC
Install
npm install @aller/labrador-utils@0.0.23

Documentation

Labrador Utilities Greenkeeper badge wercker status

Install

yarn add @aller/labrador-utils

or

npm install @aller/labrador-utils

Modules

Labrador API

Init

const { api } = require('labrador-utils')
const labApi = api({ base: 'http://api.secret.labrador.api.lol', site_id: 1 })

Methods

labApi.getArticles({ q: 'tag:test' }) // [{Article}...] 
labApi.getArticleById({ id: 9999999 }) // {Article} 
labApi.getArticlesByTags({ tags:['test', 'bil'] }) // [{Article}...] 
labApi.getArticlesByTag({ tag: 'test' }) // [{Article}...] 
labApi.getArticlesBySection({ section: 'mat' }) // [{Article}...] 
labApi.getFrontPage({ id: 9999999 }) // { FrontPage }
labApi.getFragment({ id: 9999999 }) // <HTML>