Giter Club home page Giter Club logo

hashbrown-node-driver's Introduction

Node.js driver for HashBrown CMS

A tool for easily accessing your HashBrown CMS content data on your site

Usage

$ npm install hashbrown-driver
const HashBrown = require('hashbrown-driver');

Example project

Check out the example project

API

The helper classes are accessed thusly:

HashBrown.content       // ContentHelper
HashBrown.media         // MediaHelper
HashBrown.forms         // FormsHelper
HashBrown.templates     // TemplateHelper

ContentHelper

A helper class for fetching content

Kind: global class

ContentHelper.getTree(updateCache) ⇒ Promise

Gets the entire content tree

Kind: static method of ContentHelper
Returns: Promise - Object

Param Type Default
updateCache Boolean false

ContentHelper.setTree(json) ⇒ Promise

Saves the JSON tree

Kind: static method of ContentHelper
Returns: Promise - promise

Param Type
json Object

ContentHelper.getById(id) ⇒ Promise

Gets a content node by id

Kind: static method of ContentHelper
Returns: Promise - Content

Param Type
id String

ContentHelper.getByUrl(url) ⇒ Promise

Gets a content node by url

Kind: static method of ContentHelper
Returns: Promise - Content

Param Type
url String

ContentHelper.deleteById(id) ⇒ Promise

Delete a content node by id

Kind: static method of ContentHelper
Returns: Promise - Result

Param Type
id String

ContentHelper.setById(id, content) ⇒ Promise

Sets a content node by id

Kind: static method of ContentHelper
Returns: Promise - Content

Param Type
id String
content Object

ContentHelper.setPropertiesById(id, properties, language, meta) ⇒ Promise

Sets content node properties by id

Kind: static method of ContentHelper
Returns: Promise - Content

Param Type
id String
properties Object
language String
meta Object

ContentHelper.getPropertiesById(id, language) ⇒ Promise

Gets content node properties by id

Kind: static method of ContentHelper
Returns: Promise - Content

Param Type
id String
language String

FormsHelper

A helpers class for processing forms

Kind: global class

FormsHelper.postEntry(id, query) ⇒ Promise

Submits an entry

Kind: static method of FormsHelper
Returns: Promise - Result

Param Type
id String
query Object

TemplateHelper

A helper class for fetching templates

Kind: global class

TemplateHelper.get(type, name) ⇒ Promise

Gets a Template by name

Kind: static method of TemplateHelper
Returns: Promise - Template

Param Type
type String
name String

TemplateHelper.getAll(type) ⇒ Promise

Gets all template objects

Kind: static method of TemplateHelper
Returns: Promise - Template

Param Type
type String

hashbrown-node-driver's People

Contributors

mrzapp avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.