1.0.4 • Published 6 years ago

hashbrown-driver v1.0.4

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

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

ParamTypeDefault
updateCacheBooleanfalse

ContentHelper.setTree(json) ⇒ Promise

Saves the JSON tree

Kind: static method of ContentHelper
Returns: Promise - promise

ParamType
jsonObject

ContentHelper.getById(id) ⇒ Promise

Gets a content node by id

Kind: static method of ContentHelper
Returns: Promise - Content

ParamType
idString

ContentHelper.getByUrl(url) ⇒ Promise

Gets a content node by url

Kind: static method of ContentHelper
Returns: Promise - Content

ParamType
urlString

ContentHelper.deleteById(id) ⇒ Promise

Delete a content node by id

Kind: static method of ContentHelper
Returns: Promise - Result

ParamType
idString

ContentHelper.setById(id, content) ⇒ Promise

Sets a content node by id

Kind: static method of ContentHelper
Returns: Promise - Content

ParamType
idString
contentObject

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

Sets content node properties by id

Kind: static method of ContentHelper
Returns: Promise - Content

ParamType
idString
propertiesObject
languageString
metaObject

ContentHelper.getPropertiesById(id, language) ⇒ Promise

Gets content node properties by id

Kind: static method of ContentHelper
Returns: Promise - Content

ParamType
idString
languageString

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

ParamType
idString
queryObject

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

ParamType
typeString
nameString

TemplateHelper.getAll(type) ⇒ Promise

Gets all template objects

Kind: static method of TemplateHelper
Returns: Promise - Template

ParamType
typeString
1.0.4

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.3.5

6 years ago

0.3.4

6 years ago

0.3.3

6 years ago

0.3.2

6 years ago

0.3.1

6 years ago

0.2.19

7 years ago

0.3.0

7 years ago

0.2.18

7 years ago

0.2.17

7 years ago

0.2.16

7 years ago

0.2.15

7 years ago

0.2.14

7 years ago

0.2.13

7 years ago

0.2.12

7 years ago

0.2.11

7 years ago

0.2.10

7 years ago

0.2.9

7 years ago

0.2.8

7 years ago

0.2.7

7 years ago

0.2.6

7 years ago

0.2.5

7 years ago

0.2.4

7 years ago

0.2.3

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.6

7 years ago

0.1.5

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago