A client library for Etherpad Lite‘s JSON API.
A thin wrapper around the HTTP API. See the API documentation at etherpad.org/doc/v1.2.0/#index_api_methods.
client = EtherpadLite.client('http://localhost:9001', 'api key', '1.1')
client.getText(:padID => 'foo')
=> {:text => "Pad text"}
client.setText(:padID => 'padID', :text => 'new pad text')
A higher-level interface to the API:
ether = EtherpadLite.connect('http://localhost:9001', 'api key', '1.1')
pad = ether.pad('padID')
puts pad.text
=> 'Pad text'
pad.text = 'new pad text'
| Error | = | Class.new(StandardError) | An error returned by the server | |
| VERSION | = | '0.3.0' | Library version | |
| API_VERSION | = | '1.2.8' | API target version |
Returns a new EtherpadLite::Client.
client = EtherpadLite.client('https://etherpad.yoursite.com', 'your api key', '1.1')
client = EtherpadLite.client(9001, 'your api key', '1.1') # Alias to http://localhost:9001
Returns an EtherpadLite::Instance object.
ether = EtherpadLite.client('https://etherpad.yoursite.com', 'your api key', '1.1')
ether = EtherpadLite.client(9001, 'your api key', '1.1') # Alias to http://localhost:9001