0.2.0 • Published 11 years ago

pressgang-rest v0.2.0

Weekly downloads
2
License
-
Repository
github
Last release
11 years ago

#pressgang-ccms-rest-node

A node module that provides a REST client library for the PressGang CCMS. It provides a more semantic interface for application development than the raw PressGang REST interface. Uses restler for the REST interface.

##Installation

npm install pressgang-ccms-rest-node

Basic Usage

First, require pressgang-ccms-rest-node:

var PressGangCCMS = require('pressgang-ccms-rest-node').PressGangCCMS;

Next, create a new PressGangCCMS object:

var pressgang = new PressGangCCMS('http://127.0.0.1:8080/TopicIndex');

Now, you can get the XML of a topic:

pressgang.getTopicData('xml', 8445, 
	function(err, result){
		console.log('The topic xml content is:' + result);
	});

To get the JSON representation of a topic:

pressgang.getTopicData('json', 8445, 
	function(err, result){
		console.log('The JSON representation of the topic is:' 
		+ JSON.Stringify(result);
	});

isContentSpec is an example of a more semantic interface to PressGang:

pressgang.isContentSpec(456, 
	function(err, is){
		if (is) console.log('Topic 456 is a Content Specification')
	});
0.2.0

11 years ago

0.1.2

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago

0.0.13

11 years ago

0.0.12

11 years ago

0.0.11

11 years ago

0.0.10

11 years ago

0.0.9

11 years ago

0.0.8

11 years ago

0.0.7

11 years ago

0.0.6

11 years ago

0.0.5

12 years ago

0.0.4

12 years ago

0.0.3

12 years ago

0.0.2

12 years ago

0.0.1

12 years ago