1.0.4 • Published 8 years ago

SimpleRPC v1.0.4

Weekly downloads
27
License
-
Repository
github
Last release
8 years ago

SimpleRPC

This is an implementation of a JsonRPC client in javascript (es7) for use with jspm.

##Example

import simplerpc from "lib/simplerpc" //import the lib

var api = simplerpc("ws://127.0.0.1:1234"); //connect to a JsonRPC server and get an object to act as the API

api.UpdateCurrentUsers = (num) => { //expose a method the server can call
	document.querySelector("#currentusers").innerText = num; 
}

var data = await api.SomeMethod("arg1", 2, 3); //call any method the server exposes and await its result
console.log(data);
1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago