Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jcreigno/trac-jsonrpc-client
nodejs client for the Trac JSON RPC client
https://github.com/jcreigno/trac-jsonrpc-client
Last synced: 6 days ago
JSON representation
nodejs client for the Trac JSON RPC client
- Host: GitHub
- URL: https://github.com/jcreigno/trac-jsonrpc-client
- Owner: jcreigno
- Created: 2013-05-13T22:41:07.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-05-21T16:30:36.000Z (over 11 years ago)
- Last Synced: 2024-04-25T01:08:10.623Z (7 months ago)
- Language: JavaScript
- Size: 125 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
trac-jsonrpc-client
===================> nodejs client for the Trac JSON RPC api.
introduction
------------
Provide simple client to interact with a Trac server via JSONRPC. XmlRpcPlugin must be enabled on server.Install
-------
```
> npm install trac-jsonrpc-client
```synopsis
--------
Simple low-level call using `callRpc` :```javascript
var jsonrpc = require('trac-jsonrpc-client');
var client = jsonrpc('http://trac-host/trac/env/rpc');cli.callRpc('system.getAPIVersion',[],function(err, result){
if(err){
console.log(err);
} else{
console.log('Server JSON RPC API version is ' + result.join('.'));
}
});
```Using proxy client :
```javascript
var jsonrpc = require('trac-jsonrpc-client');
var cli = new jsonrpc('http://trac-host/trac/env/rpc');
cli.proxy(function(err, p){
// proxy is ready
p.system.getAPIVersion(function(err, result){
if(err){
console.log(err);
} else{
console.log('Server JSON RPC API version is ' + result.join('.'));
}
});
});
```If authentification is required you need to specify a `username` and `password` :
```javascript
var jsonrpc = require('trac-jsonrpc-client');
var cli = new jsonrpc('http://trac-host/trac/env/login/rpc', {
auth:{username:'tracuser',password:'hehehe'}
});
```